@jean2/client 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
function dE(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in t)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function nh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tm={exports:{}},gu={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var vy;function fE(){if(vy)return gu;vy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var a in o)a!=="key"&&(l[a]=o[a])}else l=o;return o=l.ref,{$$typeof:t,type:i,key:u,ref:o!==void 0?o:null,props:l}}return gu.Fragment=e,gu.jsx=n,gu.jsxs=n,gu}var _y;function hE(){return _y||(_y=1,Tm.exports=fE()),Tm.exports}var g=hE(),Nm={exports:{}},ft={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var yy;function pE(){if(yy)return ft;yy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),y=Symbol.iterator;function S(z){return z===null||typeof z!="object"?null:(z=y&&z[y]||z["@@iterator"],typeof z=="function"?z:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function b(z,H,F){this.props=z,this.context=H,this.refs=v,this.updater=F||C}b.prototype.isReactComponent={},b.prototype.setState=function(z,H){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,H,"setState")},b.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function _(){}_.prototype=b.prototype;function x(z,H,F){this.props=z,this.context=H,this.refs=v,this.updater=F||C}var k=x.prototype=new _;k.constructor=x,w(k,b.prototype),k.isPureReactComponent=!0;var N=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function j(z,H,F){var J=F.ref;return{$$typeof:t,type:z,key:H,ref:J!==void 0?J:null,props:F}}function O(z,H){return j(z.type,H,z.props)}function B(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function q(z){var H={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(F){return H[F]})}var $=/\/+/g;function V(z,H){return typeof z=="object"&&z!==null&&z.key!=null?q(""+z.key):H.toString(36)}function K(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(A,A):(z.status="pending",z.then(function(H){z.status==="pending"&&(z.status="fulfilled",z.value=H)},function(H){z.status==="pending"&&(z.status="rejected",z.reason=H)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function G(z,H,F,J,ne){var Z=typeof z;(Z==="undefined"||Z==="boolean")&&(z=null);var W=!1;if(z===null)W=!0;else switch(Z){case"bigint":case"string":case"number":W=!0;break;case"object":switch(z.$$typeof){case t:case e:W=!0;break;case p:return W=z._init,G(W(z._payload),H,F,J,ne)}}if(W)return ne=ne(z),W=J===""?"."+V(z,0):J,N(ne)?(F="",W!=null&&(F=W.replace($,"$&/")+"/"),G(ne,H,F,"",function(ie){return ie})):ne!=null&&(B(ne)&&(ne=O(ne,F+(ne.key==null||z&&z.key===ne.key?"":(""+ne.key).replace($,"$&/")+"/")+W)),H.push(ne)),1;W=0;var U=J===""?".":J+":";if(N(z))for(var te=0;te<z.length;te++)J=z[te],Z=U+V(J,te),W+=G(J,H,F,Z,ne);else if(te=S(z),typeof te=="function")for(z=te.call(z),te=0;!(J=z.next()).done;)J=J.value,Z=U+V(J,te++),W+=G(J,H,F,Z,ne);else if(Z==="object"){if(typeof z.then=="function")return G(K(z),H,F,J,ne);throw H=String(z),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return W}function Y(z,H,F){if(z==null)return z;var J=[],ne=0;return G(z,J,"","",function(Z){return H.call(F,Z,ne++)}),J}function Q(z){if(z._status===-1){var H=z._result;H=H(),H.then(function(F){(z._status===0||z._status===-1)&&(z._status=1,z._result=F)},function(F){(z._status===0||z._status===-1)&&(z._status=2,z._result=F)}),z._status===-1&&(z._status=0,z._result=H)}if(z._status===1)return z._result.default;throw z._result}var I=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},L={map:Y,forEach:function(z,H,F){Y(z,function(){H.apply(this,arguments)},F)},count:function(z){var H=0;return Y(z,function(){H++}),H},toArray:function(z){return Y(z,function(H){return H})||[]},only:function(z){if(!B(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return ft.Activity=h,ft.Children=L,ft.Component=b,ft.Fragment=n,ft.Profiler=o,ft.PureComponent=x,ft.StrictMode=i,ft.Suspense=d,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,ft.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},ft.cache=function(z){return function(){return z.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(z,H,F){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var J=w({},z.props),ne=z.key;if(H!=null)for(Z in H.key!==void 0&&(ne=""+H.key),H)!R.call(H,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&H.ref===void 0||(J[Z]=H[Z]);var Z=arguments.length-2;if(Z===1)J.children=F;else if(1<Z){for(var W=Array(Z),U=0;U<Z;U++)W[U]=arguments[U+2];J.children=W}return j(z.type,ne,J)},ft.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:l,_context:z},z},ft.createElement=function(z,H,F){var J,ne={},Z=null;if(H!=null)for(J in H.key!==void 0&&(Z=""+H.key),H)R.call(H,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=H[J]);var W=arguments.length-2;if(W===1)ne.children=F;else if(1<W){for(var U=Array(W),te=0;te<W;te++)U[te]=arguments[te+2];ne.children=U}if(z&&z.defaultProps)for(J in W=z.defaultProps,W)ne[J]===void 0&&(ne[J]=W[J]);return j(z,Z,ne)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(z){return{$$typeof:a,render:z}},ft.isValidElement=B,ft.lazy=function(z){return{$$typeof:p,_payload:{_status:-1,_result:z},_init:Q}},ft.memo=function(z,H){return{$$typeof:f,type:z,compare:H===void 0?null:H}},ft.startTransition=function(z){var H=M.T,F={};M.T=F;try{var J=z(),ne=M.S;ne!==null&&ne(F,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(A,I)}catch(Z){I(Z)}finally{H!==null&&F.types!==null&&(H.types=F.types),M.T=H}},ft.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},ft.use=function(z){return M.H.use(z)},ft.useActionState=function(z,H,F){return M.H.useActionState(z,H,F)},ft.useCallback=function(z,H){return M.H.useCallback(z,H)},ft.useContext=function(z){return M.H.useContext(z)},ft.useDebugValue=function(){},ft.useDeferredValue=function(z,H){return M.H.useDeferredValue(z,H)},ft.useEffect=function(z,H){return M.H.useEffect(z,H)},ft.useEffectEvent=function(z){return M.H.useEffectEvent(z)},ft.useId=function(){return M.H.useId()},ft.useImperativeHandle=function(z,H,F){return M.H.useImperativeHandle(z,H,F)},ft.useInsertionEffect=function(z,H){return M.H.useInsertionEffect(z,H)},ft.useLayoutEffect=function(z,H){return M.H.useLayoutEffect(z,H)},ft.useMemo=function(z,H){return M.H.useMemo(z,H)},ft.useOptimistic=function(z,H){return M.H.useOptimistic(z,H)},ft.useReducer=function(z,H,F){return M.H.useReducer(z,H,F)},ft.useRef=function(z){return M.H.useRef(z)},ft.useState=function(z){return M.H.useState(z)},ft.useSyncExternalStore=function(z,H,F){return M.H.useSyncExternalStore(z,H,F)},ft.useTransition=function(){return M.H.useTransition()},ft.version="19.2.4",ft}var by;function rh(){return by||(by=1,Nm.exports=pE()),Nm.exports}var D=rh();const ni=nh(D),jx=dE({__proto__:null,default:ni},[D]);var Dm={exports:{}},vu={},Mm={exports:{}},jm={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var xy;function mE(){return xy||(xy=1,(function(t){function e(G,Y){var Q=G.length;G.push(Y);e:for(;0<Q;){var I=Q-1>>>1,L=G[I];if(0<o(L,Y))G[I]=Y,G[Q]=L,Q=I;else break e}}function n(G){return G.length===0?null:G[0]}function i(G){if(G.length===0)return null;var Y=G[0],Q=G.pop();if(Q!==Y){G[0]=Q;e:for(var I=0,L=G.length,z=L>>>1;I<z;){var H=2*(I+1)-1,F=G[H],J=H+1,ne=G[J];if(0>o(F,Q))J<L&&0>o(ne,F)?(G[I]=ne,G[J]=Q,I=J):(G[I]=F,G[H]=Q,I=H);else if(J<L&&0>o(ne,Q))G[I]=ne,G[J]=Q,I=J;else break e}}return Y}function o(G,Y){var Q=G.sortIndex-Y.sortIndex;return Q!==0?Q:G.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,a=u.now();t.unstable_now=function(){return u.now()-a}}var d=[],f=[],p=1,h=null,y=3,S=!1,C=!1,w=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function k(G){for(var Y=n(f);Y!==null;){if(Y.callback===null)i(f);else if(Y.startTime<=G)i(f),Y.sortIndex=Y.expirationTime,e(d,Y);else break;Y=n(f)}}function N(G){if(w=!1,k(G),!C)if(n(d)!==null)C=!0,A||(A=!0,q());else{var Y=n(f);Y!==null&&K(N,Y.startTime-G)}}var A=!1,M=-1,R=5,j=-1;function O(){return v?!0:!(t.unstable_now()-j<R)}function B(){if(v=!1,A){var G=t.unstable_now();j=G;var Y=!0;try{e:{C=!1,w&&(w=!1,_(M),M=-1),S=!0;var Q=y;try{t:{for(k(G),h=n(d);h!==null&&!(h.expirationTime>G&&O());){var I=h.callback;if(typeof I=="function"){h.callback=null,y=h.priorityLevel;var L=I(h.expirationTime<=G);if(G=t.unstable_now(),typeof L=="function"){h.callback=L,k(G),Y=!0;break t}h===n(d)&&i(d),k(G)}else i(d);h=n(d)}if(h!==null)Y=!0;else{var z=n(f);z!==null&&K(N,z.startTime-G),Y=!1}}break e}finally{h=null,y=Q,S=!1}Y=void 0}}finally{Y?q():A=!1}}}var q;if(typeof x=="function")q=function(){x(B)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,V=$.port2;$.port1.onmessage=B,q=function(){V.postMessage(null)}}else q=function(){b(B,0)};function K(G,Y){M=b(function(){G(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(G){switch(y){case 1:case 2:case 3:var Y=3;break;default:Y=y}var Q=y;y=Y;try{return G()}finally{y=Q}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(G,Y){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Q=y;y=G;try{return Y()}finally{y=Q}},t.unstable_scheduleCallback=function(G,Y,Q){var I=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?I+Q:I):Q=I,G){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=Q+L,G={id:p++,callback:Y,priorityLevel:G,startTime:Q,expirationTime:L,sortIndex:-1},Q>I?(G.sortIndex=Q,e(f,G),n(d)===null&&G===n(f)&&(w?(_(M),M=-1):w=!0,K(N,Q-I))):(G.sortIndex=L,e(d,G),C||S||(C=!0,A||(A=!0,q()))),G},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(G){var Y=y;return function(){var Q=y;y=Y;try{return G.apply(this,arguments)}finally{y=Q}}}})(jm)),jm}var Sy;function gE(){return Sy||(Sy=1,Mm.exports=mE()),Mm.exports}var Om={exports:{}},Gn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var wy;function vE(){if(wy)return Gn;wy=1;var t=rh();function e(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(d,f,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:h==null?null:""+h,children:d,containerInfo:f,implementation:p}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Gn.createPortal=function(d,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return l(d,f,null,p)},Gn.flushSync=function(d){var f=u.T,p=i.p;try{if(u.T=null,i.p=2,d)return d()}finally{u.T=f,i.p=p,i.d.f()}},Gn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(d,f))},Gn.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Gn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?i.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:y,fetchPriority:S}):p==="script"&&i.d.X(d,{crossOrigin:h,integrity:y,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Gn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=a(f.as,f.crossOrigin);i.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(d)},Gn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin);i.d.L(d,p,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Gn.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=a(f.as,f.crossOrigin);i.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(d)},Gn.requestFormReset=function(d){i.d.r(d)},Gn.unstable_batchedUpdates=function(d,f){return d(f)},Gn.useFormState=function(d,f,p){return u.H.useFormState(d,f,p)},Gn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Gn.version="19.2.4",Gn}var Cy;function Ox(){if(Cy)return Om.exports;Cy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Om.exports=vE(),Om.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var ky;function _E(){if(ky)return vu;ky=1;var t=gE(),e=rh(),n=Ox();function i(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var s=r,c=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(c=s.return),r=s.return;while(r)}return s.tag===3?c:null}function u(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function a(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function d(r){if(l(r)!==r)throw Error(i(188))}function f(r){var s=r.alternate;if(!s){if(s=l(r),s===null)throw Error(i(188));return s!==r?null:r}for(var c=r,m=s;;){var E=c.return;if(E===null)break;var T=E.alternate;if(T===null){if(m=E.return,m!==null){c=m;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return d(E),r;if(T===m)return d(E),s;T=T.sibling}throw Error(i(188))}if(c.return!==m.return)c=E,m=T;else{for(var P=!1,X=E.child;X;){if(X===c){P=!0,c=E,m=T;break}if(X===m){P=!0,m=E,c=T;break}X=X.sibling}if(!P){for(X=T.child;X;){if(X===c){P=!0,c=T,m=E;break}if(X===m){P=!0,m=T,c=E;break}X=X.sibling}if(!P)throw Error(i(189))}}if(c.alternate!==m)throw Error(i(190))}if(c.tag!==3)throw Error(i(188));return c.stateNode.current===c?r:s}function p(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=p(r),s!==null)return s;r=r.sibling}return null}var h=Object.assign,y=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),x=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function q(r){return r===null||typeof r!="object"?null:(r=B&&r[B]||r["@@iterator"],typeof r=="function"?r:null)}var $=Symbol.for("react.client.reference");function V(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===$?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case N:return"Suspense";case A:return"SuspenseList";case j:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case C:return"Portal";case x:return r.displayName||"Context";case _:return(r._context.displayName||"Context")+".Consumer";case k:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case M:return s=r.displayName||null,s!==null?s:V(r.type)||"Memo";case R:s=r._payload,r=r._init;try{return V(r(s))}catch{}}return null}var K=Array.isArray,G=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},I=[],L=-1;function z(r){return{current:r}}function H(r){0>L||(r.current=I[L],I[L]=null,L--)}function F(r,s){L++,I[L]=r.current,r.current=s}var J=z(null),ne=z(null),Z=z(null),W=z(null);function U(r,s){switch(F(Z,s),F(ne,r),F(J,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?F0(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=F0(s),r=H0(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}H(J),F(J,r)}function te(){H(J),H(ne),H(Z)}function ie(r){r.memoizedState!==null&&F(W,r);var s=J.current,c=H0(s,r.type);s!==c&&(F(ne,r),F(J,c))}function ae(r){ne.current===r&&(H(J),H(ne)),W.current===r&&(H(W),fu._currentValue=Q)}var se,_e;function Te(r){if(se===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);se=s&&s[1]||"",_e=-1<c.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+se+r+_e}var De=!1;function Ke(r,s){if(!r||De)return"";De=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(me){var he=me}Reflect.construct(r,[],we)}else{try{we.call()}catch(me){he=me}r.call(we.prototype)}}else{try{throw Error()}catch(me){he=me}(we=r())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(me){if(me&&he&&typeof me.stack=="string")return[me.stack,he.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=m.DetermineComponentFrameRoot(),P=T[0],X=T[1];if(P&&X){var re=P.split(`
|
|
44
|
+
`),fe=X.split(`
|
|
45
|
+
`);for(E=m=0;m<re.length&&!re[m].includes("DetermineComponentFrameRoot");)m++;for(;E<fe.length&&!fe[E].includes("DetermineComponentFrameRoot");)E++;if(m===re.length||E===fe.length)for(m=re.length-1,E=fe.length-1;1<=m&&0<=E&&re[m]!==fe[E];)E--;for(;1<=m&&0<=E;m--,E--)if(re[m]!==fe[E]){if(m!==1||E!==1)do if(m--,E--,0>E||re[m]!==fe[E]){var ye=`
|
|
46
|
+
`+re[m].replace(" at new "," at ");return r.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",r.displayName)),ye}while(1<=m&&0<=E);break}}}finally{De=!1,Error.prepareStackTrace=c}return(c=r?r.displayName||r.name:"")?Te(c):""}function Ae(r,s){switch(r.tag){case 26:case 27:case 5:return Te(r.type);case 16:return Te("Lazy");case 13:return r.child!==s&&s!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return Ke(r.type,!1);case 11:return Ke(r.type.render,!1);case 1:return Ke(r.type,!0);case 31:return Te("Activity");default:return""}}function rt(r){try{var s="",c=null;do s+=Ae(r,c),c=r,r=r.return;while(r);return s}catch(m){return`
|
|
47
|
+
Error generating stack: `+m.message+`
|
|
48
|
+
`+m.stack}}var Je=Object.prototype.hasOwnProperty,Qe=t.unstable_scheduleCallback,ot=t.unstable_cancelCallback,ue=t.unstable_shouldYield,it=t.unstable_requestPaint,Ze=t.unstable_now,dt=t.unstable_getCurrentPriorityLevel,ce=t.unstable_ImmediatePriority,xe=t.unstable_UserBlockingPriority,pe=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Le=t.unstable_IdlePriority,nt=t.log,je=t.unstable_setDisableYieldValue,Ve=null,ct=null;function Tt(r){if(typeof nt=="function"&&je(r),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(Ve,r)}catch{}}var be=Math.clz32?Math.clz32:St,et=Math.log,at=Math.LN2;function St(r){return r>>>=0,r===0?32:31-(et(r)/at|0)|0}var Pt=256,Ft=262144,Gt=4194304;function $t(r){var s=r&42;if(s!==0)return s;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Rn(r,s,c){var m=r.pendingLanes;if(m===0)return 0;var E=0,T=r.suspendedLanes,P=r.pingedLanes;r=r.warmLanes;var X=m&134217727;return X!==0?(m=X&~T,m!==0?E=$t(m):(P&=X,P!==0?E=$t(P):c||(c=X&~r,c!==0&&(E=$t(c))))):(X=m&~T,X!==0?E=$t(X):P!==0?E=$t(P):c||(c=m&~r,c!==0&&(E=$t(c)))),E===0?0:s!==0&&s!==E&&(s&T)===0&&(T=E&-E,c=s&-s,T>=c||T===32&&(c&4194048)!==0)?s:E}function Tn(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function Zt(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function on(){var r=Gt;return Gt<<=1,(Gt&62914560)===0&&(Gt=4194304),r}function Kt(r){for(var s=[],c=0;31>c;c++)s.push(r);return s}function Un(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function oi(r,s,c,m,E,T){var P=r.pendingLanes;r.pendingLanes=c,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=c,r.entangledLanes&=c,r.errorRecoveryDisabledLanes&=c,r.shellSuspendCounter=0;var X=r.entanglements,re=r.expirationTimes,fe=r.hiddenUpdates;for(c=P&~c;0<c;){var ye=31-be(c),we=1<<ye;X[ye]=0,re[ye]=-1;var he=fe[ye];if(he!==null)for(fe[ye]=null,ye=0;ye<he.length;ye++){var me=he[ye];me!==null&&(me.lane&=-536870913)}c&=~we}m!==0&&ar(r,m,0),T!==0&&E===0&&r.tag!==0&&(r.suspendedLanes|=T&~(P&~s))}function ar(r,s,c){r.pendingLanes|=s,r.suspendedLanes&=~s;var m=31-be(s);r.entangledLanes|=s,r.entanglements[m]=r.entanglements[m]|1073741824|c&261930}function ai(r,s){var c=r.entangledLanes|=s;for(r=r.entanglements;c;){var m=31-be(c),E=1<<m;E&s|r[m]&s&&(r[m]|=s),c&=~E}}function Ur(r,s){var c=s&-s;return c=(c&42)!==0?1:li(c),(c&(r.suspendedLanes|s))!==0?0:c}function li(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function $r(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function pn(){var r=Y.p;return r!==0?r:(r=window.event,r===void 0?32:uy(r.type))}function Cn(r,s){var c=Y.p;try{return Y.p=r,s()}finally{Y.p=c}}var Jt=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Jt,en="__reactProps$"+Jt,Nn="__reactContainer$"+Jt,Dn="__reactEvents$"+Jt,ci="__reactListeners$"+Jt,qr="__reactHandles$"+Jt,yr="__reactResources$"+Jt,$n="__reactMarker$"+Jt;function br(r){delete r[Nt],delete r[en],delete r[Dn],delete r[ci],delete r[qr]}function Mn(r){var s=r[Nt];if(s)return s;for(var c=r.parentNode;c;){if(s=c[Nn]||c[Nt]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(r=K0(r);r!==null;){if(c=r[Nt])return c;r=K0(r)}return s}r=c,c=r.parentNode}return null}function Qn(r){if(r=r[Nt]||r[Nn]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function lr(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(i(33))}function qn(r){var s=r[yr];return s||(s=r[yr]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Mt(r){r[$n]=!0}var xr=new Set,Di={};function jn(r,s){Zn(r,s),Zn(r+"Capture",s)}function Zn(r,s){for(Di[r]=s,r=0;r<s.length;r++)xr.add(s[r])}var Sr=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jn={},Vr={};function wr(r){return Je.call(Vr,r)?!0:Je.call(Jn,r)?!1:Sr.test(r)?Vr[r]=!0:(Jn[r]=!0,!1)}function Cr(r,s,c){if(wr(s))if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+c)}}function er(r,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+c)}}function cr(r,s,c,m){if(m===null)r.removeAttribute(c);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(c);return}r.setAttributeNS(s,c,""+m)}}function On(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Ho(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ua(r,s,c){var m=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var E=m.get,T=m.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return E.call(this)},set:function(P){c=""+P,T.call(this,P)}}),Object.defineProperty(r,s,{enumerable:m.enumerable}),{getValue:function(){return c},setValue:function(P){c=""+P},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function zs(r){if(!r._valueTracker){var s=Ho(r)?"checked":"value";r._valueTracker=Ua(r,s,""+r[s])}}function Uo(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return r&&(m=Ho(r)?r.checked?"true":"false":r.value),r=m,r!==c?(s.setValue(r),!0):!1}function $o(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var Sc=/[\n"\\]/g;function Pe(r){return r.replace(Sc,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Ye(r,s,c,m,E,T,P,X){r.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?r.type=P:r.removeAttribute("type"),s!=null?P==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+On(s)):r.value!==""+On(s)&&(r.value=""+On(s)):P!=="submit"&&P!=="reset"||r.removeAttribute("value"),s!=null?Ps(r,P,On(s)):c!=null?Ps(r,P,On(c)):m!=null&&r.removeAttribute("value"),E==null&&T!=null&&(r.defaultChecked=!!T),E!=null&&(r.checked=E&&typeof E!="function"&&typeof E!="symbol"),X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?r.name=""+On(X):r.removeAttribute("name")}function qo(r,s,c,m,E,T,P,X){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.type=T),s!=null||c!=null){if(!(T!=="submit"&&T!=="reset"||s!=null)){zs(r);return}c=c!=null?""+On(c):"",s=s!=null?""+On(s):c,X||s===r.value||(r.value=s),r.defaultValue=s}m=m!=null?m:E,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=X?r.checked:!!m,r.defaultChecked=!!m,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(r.name=P),zs(r)}function Ps(r,s,c){s==="number"&&$o(r.ownerDocument)===r||r.defaultValue===""+c||(r.defaultValue=""+c)}function ui(r,s,c,m){if(r=r.options,s){s={};for(var E=0;E<c.length;E++)s["$"+c[E]]=!0;for(c=0;c<r.length;c++)E=s.hasOwnProperty("$"+r[c].value),r[c].selected!==E&&(r[c].selected=E),E&&m&&(r[c].defaultSelected=!0)}else{for(c=""+On(c),s=null,E=0;E<r.length;E++){if(r[E].value===c){r[E].selected=!0,m&&(r[E].defaultSelected=!0);return}s!==null||r[E].disabled||(s=r[E])}s!==null&&(s.selected=!0)}}function Vo(r,s,c){if(s!=null&&(s=""+On(s),s!==r.value&&(r.value=s),c==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=c!=null?""+On(c):""}function Wo(r,s,c,m){if(s==null){if(m!=null){if(c!=null)throw Error(i(92));if(K(m)){if(1<m.length)throw Error(i(93));m=m[0]}c=m}c==null&&(c=""),s=c}c=On(s),r.defaultValue=c,m=r.textContent,m===c&&m!==""&&m!==null&&(r.value=m),zs(r)}function di(r,s){if(s){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=s;return}}r.textContent=s}var $a=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Go(r,s,c){var m=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?m?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":m?r.setProperty(s,c):typeof c!="number"||c===0||$a.has(s)?s==="float"?r.cssFloat=c:r[s]=(""+c).trim():r[s]=c+"px"}function Ko(r,s,c){if(s!=null&&typeof s!="object")throw Error(i(62));if(r=r.style,c!=null){for(var m in c)!c.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?r.setProperty(m,""):m==="float"?r.cssFloat="":r[m]="");for(var E in s)m=s[E],s.hasOwnProperty(E)&&c[E]!==m&&Go(r,E,m)}else for(var T in s)s.hasOwnProperty(T)&&Go(r,T,s[T])}function an(r){if(r.indexOf("-")===-1)return!1;switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qa=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Kh=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ji(r){return Kh.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function tr(){}var Fs=null;function Hs(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var fi=null,Yt=null;function Yo(r){var s=Qn(r);if(s&&(r=s.stateNode)){var c=r[en]||null;e:switch(r=s.stateNode,s.type){case"input":if(Ye(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Pe(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==r&&m.form===r.form){var E=m[en]||null;if(!E)throw Error(i(90));Ye(m,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(s=0;s<c.length;s++)m=c[s],m.form===r.form&&Uo(m)}break e;case"textarea":Vo(r,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&ui(r,!!c.multiple,s,!1)}}}var Xo=!1;function Qo(r,s,c){if(Xo)return r(s,c);Xo=!0;try{var m=r(s);return m}finally{if(Xo=!1,(fi!==null||Yt!==null)&&(Vd(),fi&&(s=fi,r=Yt,Yt=fi=null,Yo(s),r)))for(s=0;s<r.length;s++)Yo(r[s])}}function Mi(r,s){var c=r.stateNode;if(c===null)return null;var m=c[en]||null;if(m===null)return null;c=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(r=r.type,m=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!m;break e;default:r=!1}if(r)return null;if(c&&typeof c!="function")throw Error(i(231,s,typeof c));return c}var ur=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Us=!1;if(ur)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){Us=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{Us=!1}var kr=null,$s=null,es=null;function Zo(){if(es)return es;var r,s=$s,c=s.length,m,E="value"in kr?kr.value:kr.textContent,T=E.length;for(r=0;r<c&&s[r]===E[r];r++);var P=c-r;for(m=1;m<=P&&s[c-m]===E[T-m];m++);return es=E.slice(r,1<m?1-m:void 0)}function ts(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function ns(){return!0}function Jo(){return!1}function mn(r){function s(c,m,E,T,P){this._reactName=c,this._targetInst=E,this.type=m,this.nativeEvent=T,this.target=P,this.currentTarget=null;for(var X in r)r.hasOwnProperty(X)&&(c=r[X],this[X]=c?c(T):T[X]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?ns:Jo,this.isPropagationStopped=Jo,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=ns)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=ns)},persist:function(){},isPersistent:ns}),s}var Wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=mn(Wr),Gr=h({},Wr,{view:0,detail:0}),Va=mn(Gr),wc,qs,Vs,is=h({},Gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gs,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Vs&&(Vs&&r.type==="mousemove"?(wc=r.screenX-Vs.screenX,qs=r.screenY-Vs.screenY):qs=wc=0,Vs=r),wc)},movementY:function(r){return"movementY"in r?r.movementY:qs}}),Ws=mn(is),Wa=h({},is,{dataTransfer:0}),ea=mn(Wa),Ga=h({},Gr,{relatedTarget:0}),ss=mn(Ga),Ka=h({},Wr,{animationName:0,elapsedTime:0,pseudoElement:0}),Ya=mn(Ka),Xa=h({},Wr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Qa=mn(Xa),Za=h({},Wr,{data:0}),ta=mn(Za),Ja={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Be={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},el={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Oi(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=el[r])?!!s[r]:!1}function Gs(){return Oi}var hi=h({},Gr,{key:function(r){if(r.key){var s=Ja[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=ts(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Be[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gs,charCode:function(r){return r.type==="keypress"?ts(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ts(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),tl=mn(hi),na=h({},is,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ra=mn(na),Cc=h({},Gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gs}),nl=mn(Cc),kc=h({},Wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rl=mn(kc),Ec=h({},is,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),il=mn(Ec),ia=h({},Wr,{newState:0,oldState:0}),sl=mn(ia),sa=[9,13,27,32],Ks=ur&&"CompositionEvent"in window,os=null;ur&&"documentMode"in document&&(os=document.documentMode);var ol=ur&&"TextEvent"in window&&!os,al=ur&&(!Ks||os&&8<os&&11>=os),oa=" ",ll=!1;function aa(r,s){switch(r){case"keyup":return sa.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function as(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var pi=!1;function Ac(r,s){switch(r){case"compositionend":return as(s);case"keypress":return s.which!==32?null:(ll=!0,oa);case"textInput":return r=s.data,r===oa&&ll?null:r;default:return null}}function cl(r,s){if(pi)return r==="compositionend"||!Ks&&aa(r,s)?(r=Zo(),es=$s=kr=null,pi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return al&&s.locale!=="ko"?null:s.data;default:return null}}var Rc={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function la(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!Rc[r.type]:s==="textarea"}function ul(r,s,c,m){fi?Yt?Yt.push(m):Yt=[m]:fi=m,s=Zd(s,"onChange"),0<s.length&&(c=new rs("onChange","change",null,c,m),r.push({event:c,listeners:s}))}var Li=null,ls=null;function dl(r){O0(r,0)}function Ys(r){var s=lr(r);if(Uo(s))return r}function ca(r,s){if(r==="change")return s}var cs=!1;if(ur){var Xs;if(ur){var ua="oninput"in document;if(!ua){var da=document.createElement("div");da.setAttribute("oninput","return;"),ua=typeof da.oninput=="function"}Xs=ua}else Xs=!1;cs=Xs&&(!document.documentMode||9<document.documentMode)}function fl(){Li&&(Li.detachEvent("onpropertychange",fa),ls=Li=null)}function fa(r){if(r.propertyName==="value"&&Ys(ls)){var s=[];ul(s,ls,r,Hs(r)),Qo(dl,s)}}function Tc(r,s,c){r==="focusin"?(fl(),Li=s,ls=c,Li.attachEvent("onpropertychange",fa)):r==="focusout"&&fl()}function hl(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ys(ls)}function ha(r,s){if(r==="click")return Ys(s)}function pl(r,s){if(r==="input"||r==="change")return Ys(s)}function pa(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var ln=typeof Object.is=="function"?Object.is:pa;function ut(r,s){if(ln(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var c=Object.keys(r),m=Object.keys(s);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var E=c[m];if(!Je.call(s,E)||!ln(r[E],s[E]))return!1}return!0}function us(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function mi(r,s){var c=us(r);r=0;for(var m;c;){if(c.nodeType===3){if(m=r+c.textContent.length,r<=s&&m>=s)return{node:c,offset:s-r};r=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=us(c)}}function gi(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?gi(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function vi(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=$o(r.document);s instanceof r.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)r=s.contentWindow;else break;s=$o(r.document)}return s}function Ii(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var Qs=ur&&"documentMode"in document&&11>=document.documentMode,nr=null,Kr=null,Yr=null,Bi=!1;function ds(r,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Bi||nr==null||nr!==$o(m)||(m=nr,"selectionStart"in m&&Ii(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Yr&&ut(Yr,m)||(Yr=m,m=Zd(Kr,"onSelect"),0<m.length&&(s=new rs("onSelect","select",null,s,c),r.push({event:s,listeners:m}),s.target=nr)))}function Xr(r,s){var c={};return c[r.toLowerCase()]=s.toLowerCase(),c["Webkit"+r]="webkit"+s,c["Moz"+r]="moz"+s,c}var Er={animationend:Xr("Animation","AnimationEnd"),animationiteration:Xr("Animation","AnimationIteration"),animationstart:Xr("Animation","AnimationStart"),transitionrun:Xr("Transition","TransitionRun"),transitionstart:Xr("Transition","TransitionStart"),transitioncancel:Xr("Transition","TransitionCancel"),transitionend:Xr("Transition","TransitionEnd")},Zs={},Nc={};ur&&(Nc=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);function zi(r){if(Zs[r])return Zs[r];if(!Er[r])return r;var s=Er[r],c;for(c in s)if(s.hasOwnProperty(c)&&c in Nc)return Zs[r]=s[c];return r}var Dc=zi("animationend"),Mc=zi("animationiteration"),jc=zi("animationstart"),pd=zi("transitionrun"),md=zi("transitionstart"),gd=zi("transitioncancel"),Oc=zi("transitionend"),Lc=new Map,ml="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ml.push("scrollEnd");function ee(r,s){Lc.set(r,s),jn(s,[r])}var Re=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Ue=[],Xe=0,ge=0;function ke(){for(var r=Xe,s=ge=Xe=0;s<r;){var c=Ue[s];Ue[s++]=null;var m=Ue[s];Ue[s++]=null;var E=Ue[s];Ue[s++]=null;var T=Ue[s];if(Ue[s++]=null,m!==null&&E!==null){var P=m.pending;P===null?E.next=E:(E.next=P.next,P.next=E),m.pending=E}T!==0&&Vn(c,E,T)}}function $e(r,s,c,m){Ue[Xe++]=r,Ue[Xe++]=s,Ue[Xe++]=c,Ue[Xe++]=m,ge|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function vt(r,s,c,m){return $e(r,s,c,m),gn(r)}function Xt(r,s){return $e(r,null,null,s),gn(r)}function Vn(r,s,c){r.lanes|=c;var m=r.alternate;m!==null&&(m.lanes|=c);for(var E=!1,T=r.return;T!==null;)T.childLanes|=c,m=T.alternate,m!==null&&(m.childLanes|=c),T.tag===22&&(r=T.stateNode,r===null||r._visibility&1||(E=!0)),r=T,T=T.return;return r.tag===3?(T=r.stateNode,E&&s!==null&&(E=31-be(c),r=T.hiddenUpdates,m=r[E],m===null?r[E]=[s]:m.push(s),s.lane=c|536870912),T):null}function gn(r){if(50<su)throw su=0,Jp=null,Error(i(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var Wn={};function Pi(r,s,c,m){this.tag=r,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(r,s,c,m){return new Pi(r,s,c,m)}function Ic(r){return r=r.prototype,!(!r||!r.isReactComponent)}function _i(r,s){var c=r.alternate;return c===null?(c=vn(r.tag,s,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=s,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&65011712,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,s=r.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c.refCleanup=r.refCleanup,c}function fs(r,s){r.flags&=65011714;var c=r.alternate;return c===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=c.childLanes,r.lanes=c.lanes,r.child=c.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=c.memoizedProps,r.memoizedState=c.memoizedState,r.updateQueue=c.updateQueue,r.type=c.type,s=c.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function yi(r,s,c,m,E,T){var P=0;if(m=r,typeof r=="function")Ic(r)&&(P=1);else if(typeof r=="string")P=Jk(r,c,J.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case j:return r=vn(31,c,s,E),r.elementType=j,r.lanes=T,r;case w:return dr(c.children,E,T,s);case v:P=8,E|=24;break;case b:return r=vn(12,c,s,E|2),r.elementType=b,r.lanes=T,r;case N:return r=vn(13,c,s,E),r.elementType=N,r.lanes=T,r;case A:return r=vn(19,c,s,E),r.elementType=A,r.lanes=T,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case x:P=10;break e;case _:P=9;break e;case k:P=11;break e;case M:P=14;break e;case R:P=16,m=null;break e}P=29,c=Error(i(130,r===null?"null":typeof r,"")),m=null}return s=vn(P,c,s,E),s.elementType=r,s.type=m,s.lanes=T,s}function dr(r,s,c,m){return r=vn(7,r,m,s),r.lanes=c,r}function Fi(r,s,c){return r=vn(6,r,null,s),r.lanes=c,r}function hs(r){var s=vn(18,null,null,0);return s.stateNode=r,s}function Hi(r,s,c){return s=vn(4,r.children!==null?r.children:[],r.key,s),s.lanes=c,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var ps=new WeakMap;function _n(r,s){if(typeof r=="object"&&r!==null){var c=ps.get(r);return c!==void 0?c:(s={value:r,source:s,stack:rt(s)},ps.set(r,s),s)}return{value:r,source:s,stack:rt(s)}}var Ar=[],Rr=0,bi=null,Qr=0,yn=[],bn=0,rr=null,Ln=1,jt="";function In(r,s){Ar[Rr++]=Qr,Ar[Rr++]=bi,bi=r,Qr=s}function Bc(r,s,c){yn[bn++]=Ln,yn[bn++]=jt,yn[bn++]=rr,rr=r;var m=Ln;r=jt;var E=32-be(m)-1;m&=~(1<<E),c+=1;var T=32-be(s)+E;if(30<T){var P=E-E%5;T=(m&(1<<P)-1).toString(32),m>>=P,E-=P,Ln=1<<32-be(s)+E|c<<E|m,jt=T+r}else Ln=1<<T|c<<E|m,jt=r}function zc(r){r.return!==null&&(In(r,1),Bc(r,1,0))}function Yh(r){for(;r===bi;)bi=Ar[--Rr],Ar[Rr]=null,Qr=Ar[--Rr],Ar[Rr]=null;for(;r===rr;)rr=yn[--bn],yn[bn]=null,jt=yn[--bn],yn[bn]=null,Ln=yn[--bn],yn[bn]=null}function bv(r,s){yn[bn++]=Ln,yn[bn++]=jt,yn[bn++]=rr,Ln=s.id,jt=s.overflow,rr=r}var Bn=null,Vt=null,kt=!1,Js=null,Zr=!1,Xh=Error(i(519));function eo(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pc(_n(s,r)),Xh}function xv(r){var s=r.stateNode,c=r.type,m=r.memoizedProps;switch(s[Nt]=r,s[en]=m,c){case"dialog":bt("cancel",s),bt("close",s);break;case"iframe":case"object":case"embed":bt("load",s);break;case"video":case"audio":for(c=0;c<au.length;c++)bt(au[c],s);break;case"source":bt("error",s);break;case"img":case"image":case"link":bt("error",s),bt("load",s);break;case"details":bt("toggle",s);break;case"input":bt("invalid",s),qo(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":bt("invalid",s);break;case"textarea":bt("invalid",s),Wo(s,m.value,m.defaultValue,m.children)}c=m.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||m.suppressHydrationWarning===!0||z0(s.textContent,c)?(m.popover!=null&&(bt("beforetoggle",s),bt("toggle",s)),m.onScroll!=null&&bt("scroll",s),m.onScrollEnd!=null&&bt("scrollend",s),m.onClick!=null&&(s.onclick=tr),s=!0):s=!1,s||eo(r,!0)}function Sv(r){for(Bn=r.return;Bn;)switch(Bn.tag){case 5:case 31:case 13:Zr=!1;return;case 27:case 3:Zr=!0;return;default:Bn=Bn.return}}function gl(r){if(r!==Bn)return!1;if(!kt)return Sv(r),kt=!0,!1;var s=r.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=r.type,c=!(c!=="form"&&c!=="button")||pm(r.type,r.memoizedProps)),c=!c),c&&Vt&&eo(r),Sv(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Vt=G0(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Vt=G0(r)}else s===27?(s=Vt,mo(r.type)?(r=ym,ym=null,Vt=r):Vt=s):Vt=Bn?ei(r.stateNode.nextSibling):null;return!0}function ma(){Vt=Bn=null,kt=!1}function Qh(){var r=Js;return r!==null&&(mr===null?mr=r:mr.push.apply(mr,r),Js=null),r}function Pc(r){Js===null?Js=[r]:Js.push(r)}var Zh=z(null),ga=null,ms=null;function to(r,s,c){F(Zh,s._currentValue),s._currentValue=c}function gs(r){r._currentValue=Zh.current,H(Zh)}function Jh(r,s,c){for(;r!==null;){var m=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),r===c)break;r=r.return}}function ep(r,s,c,m){var E=r.child;for(E!==null&&(E.return=r);E!==null;){var T=E.dependencies;if(T!==null){var P=E.child;T=T.firstContext;e:for(;T!==null;){var X=T;T=E;for(var re=0;re<s.length;re++)if(X.context===s[re]){T.lanes|=c,X=T.alternate,X!==null&&(X.lanes|=c),Jh(T.return,c,r),m||(P=null);break e}T=X.next}}else if(E.tag===18){if(P=E.return,P===null)throw Error(i(341));P.lanes|=c,T=P.alternate,T!==null&&(T.lanes|=c),Jh(P,c,r),P=null}else P=E.child;if(P!==null)P.return=E;else for(P=E;P!==null;){if(P===r){P=null;break}if(E=P.sibling,E!==null){E.return=P.return,P=E;break}P=P.return}E=P}}function vl(r,s,c,m){r=null;for(var E=s,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var P=E.alternate;if(P===null)throw Error(i(387));if(P=P.memoizedProps,P!==null){var X=E.type;ln(E.pendingProps.value,P.value)||(r!==null?r.push(X):r=[X])}}else if(E===W.current){if(P=E.alternate,P===null)throw Error(i(387));P.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(r!==null?r.push(fu):r=[fu])}E=E.return}r!==null&&ep(s,r,c,m),s.flags|=262144}function vd(r){for(r=r.firstContext;r!==null;){if(!ln(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function va(r){ga=r,ms=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function zn(r){return wv(ga,r)}function _d(r,s){return ga===null&&va(r),wv(r,s)}function wv(r,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},ms===null){if(r===null)throw Error(i(308));ms=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else ms=ms.next=s;return c}var Y3=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(c,m){r.push(m)}};this.abort=function(){s.aborted=!0,r.forEach(function(c){return c()})}},X3=t.unstable_scheduleCallback,Q3=t.unstable_NormalPriority,cn={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tp(){return{controller:new Y3,data:new Map,refCount:0}}function Fc(r){r.refCount--,r.refCount===0&&X3(Q3,function(){r.controller.abort()})}var Hc=null,np=0,_l=0,yl=null;function Z3(r,s){if(Hc===null){var c=Hc=[];np=0,_l=sm(),yl={status:"pending",value:void 0,then:function(m){c.push(m)}}}return np++,s.then(Cv,Cv),s}function Cv(){if(--np===0&&Hc!==null){yl!==null&&(yl.status="fulfilled");var r=Hc;Hc=null,_l=0,yl=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function J3(r,s){var c=[],m={status:"pending",value:null,reason:null,then:function(E){c.push(E)}};return r.then(function(){m.status="fulfilled",m.value=s;for(var E=0;E<c.length;E++)(0,c[E])(s)},function(E){for(m.status="rejected",m.reason=E,E=0;E<c.length;E++)(0,c[E])(void 0)}),m}var kv=G.S;G.S=function(r,s){l0=Ze(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Z3(r,s),kv!==null&&kv(r,s)};var _a=z(null);function rp(){var r=_a.current;return r!==null?r:Ht.pooledCache}function yd(r,s){s===null?F(_a,_a.current):F(_a,s.pool)}function Ev(){var r=rp();return r===null?null:{parent:cn._currentValue,pool:r}}var bl=Error(i(460)),ip=Error(i(474)),bd=Error(i(542)),xd={then:function(){}};function Av(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Rv(r,s,c){switch(c=r[c],c===void 0?r.push(s):c!==s&&(s.then(tr,tr),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Nv(r),r;default:if(typeof s.status=="string")s.then(tr,tr);else{if(r=Ht,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=s,r.status="pending",r.then(function(m){if(s.status==="pending"){var E=s;E.status="fulfilled",E.value=m}},function(m){if(s.status==="pending"){var E=s;E.status="rejected",E.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Nv(r),r}throw ba=s,bl}}function ya(r){try{var s=r._init;return s(r._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(ba=c,bl):c}}var ba=null;function Tv(){if(ba===null)throw Error(i(459));var r=ba;return ba=null,r}function Nv(r){if(r===bl||r===bd)throw Error(i(483))}var xl=null,Uc=0;function Sd(r){var s=Uc;return Uc+=1,xl===null&&(xl=[]),Rv(xl,r,s)}function $c(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function wd(r,s){throw s.$$typeof===y?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function Dv(r){function s(le,oe){if(r){var de=le.deletions;de===null?(le.deletions=[oe],le.flags|=16):de.push(oe)}}function c(le,oe){if(!r)return null;for(;oe!==null;)s(le,oe),oe=oe.sibling;return null}function m(le){for(var oe=new Map;le!==null;)le.key!==null?oe.set(le.key,le):oe.set(le.index,le),le=le.sibling;return oe}function E(le,oe){return le=_i(le,oe),le.index=0,le.sibling=null,le}function T(le,oe,de){return le.index=de,r?(de=le.alternate,de!==null?(de=de.index,de<oe?(le.flags|=67108866,oe):de):(le.flags|=67108866,oe)):(le.flags|=1048576,oe)}function P(le){return r&&le.alternate===null&&(le.flags|=67108866),le}function X(le,oe,de,Se){return oe===null||oe.tag!==6?(oe=Fi(de,le.mode,Se),oe.return=le,oe):(oe=E(oe,de),oe.return=le,oe)}function re(le,oe,de,Se){var tt=de.type;return tt===w?ye(le,oe,de.props.children,Se,de.key):oe!==null&&(oe.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===R&&ya(tt)===oe.type)?(oe=E(oe,de.props),$c(oe,de),oe.return=le,oe):(oe=yi(de.type,de.key,de.props,null,le.mode,Se),$c(oe,de),oe.return=le,oe)}function fe(le,oe,de,Se){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==de.containerInfo||oe.stateNode.implementation!==de.implementation?(oe=Hi(de,le.mode,Se),oe.return=le,oe):(oe=E(oe,de.children||[]),oe.return=le,oe)}function ye(le,oe,de,Se,tt){return oe===null||oe.tag!==7?(oe=dr(de,le.mode,Se,tt),oe.return=le,oe):(oe=E(oe,de),oe.return=le,oe)}function we(le,oe,de){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return oe=Fi(""+oe,le.mode,de),oe.return=le,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:return de=yi(oe.type,oe.key,oe.props,null,le.mode,de),$c(de,oe),de.return=le,de;case C:return oe=Hi(oe,le.mode,de),oe.return=le,oe;case R:return oe=ya(oe),we(le,oe,de)}if(K(oe)||q(oe))return oe=dr(oe,le.mode,de,null),oe.return=le,oe;if(typeof oe.then=="function")return we(le,Sd(oe),de);if(oe.$$typeof===x)return we(le,_d(le,oe),de);wd(le,oe)}return null}function he(le,oe,de,Se){var tt=oe!==null?oe.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return tt!==null?null:X(le,oe,""+de,Se);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case S:return de.key===tt?re(le,oe,de,Se):null;case C:return de.key===tt?fe(le,oe,de,Se):null;case R:return de=ya(de),he(le,oe,de,Se)}if(K(de)||q(de))return tt!==null?null:ye(le,oe,de,Se,null);if(typeof de.then=="function")return he(le,oe,Sd(de),Se);if(de.$$typeof===x)return he(le,oe,_d(le,de),Se);wd(le,de)}return null}function me(le,oe,de,Se,tt){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return le=le.get(de)||null,X(oe,le,""+Se,tt);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case S:return le=le.get(Se.key===null?de:Se.key)||null,re(oe,le,Se,tt);case C:return le=le.get(Se.key===null?de:Se.key)||null,fe(oe,le,Se,tt);case R:return Se=ya(Se),me(le,oe,de,Se,tt)}if(K(Se)||q(Se))return le=le.get(de)||null,ye(oe,le,Se,tt,null);if(typeof Se.then=="function")return me(le,oe,de,Sd(Se),tt);if(Se.$$typeof===x)return me(le,oe,de,_d(oe,Se),tt);wd(oe,Se)}return null}function Fe(le,oe,de,Se){for(var tt=null,At=null,We=oe,pt=oe=0,Ct=null;We!==null&&pt<de.length;pt++){We.index>pt?(Ct=We,We=null):Ct=We.sibling;var Rt=he(le,We,de[pt],Se);if(Rt===null){We===null&&(We=Ct);break}r&&We&&Rt.alternate===null&&s(le,We),oe=T(Rt,oe,pt),At===null?tt=Rt:At.sibling=Rt,At=Rt,We=Ct}if(pt===de.length)return c(le,We),kt&&In(le,pt),tt;if(We===null){for(;pt<de.length;pt++)We=we(le,de[pt],Se),We!==null&&(oe=T(We,oe,pt),At===null?tt=We:At.sibling=We,At=We);return kt&&In(le,pt),tt}for(We=m(We);pt<de.length;pt++)Ct=me(We,le,pt,de[pt],Se),Ct!==null&&(r&&Ct.alternate!==null&&We.delete(Ct.key===null?pt:Ct.key),oe=T(Ct,oe,pt),At===null?tt=Ct:At.sibling=Ct,At=Ct);return r&&We.forEach(function(bo){return s(le,bo)}),kt&&In(le,pt),tt}function lt(le,oe,de,Se){if(de==null)throw Error(i(151));for(var tt=null,At=null,We=oe,pt=oe=0,Ct=null,Rt=de.next();We!==null&&!Rt.done;pt++,Rt=de.next()){We.index>pt?(Ct=We,We=null):Ct=We.sibling;var bo=he(le,We,Rt.value,Se);if(bo===null){We===null&&(We=Ct);break}r&&We&&bo.alternate===null&&s(le,We),oe=T(bo,oe,pt),At===null?tt=bo:At.sibling=bo,At=bo,We=Ct}if(Rt.done)return c(le,We),kt&&In(le,pt),tt;if(We===null){for(;!Rt.done;pt++,Rt=de.next())Rt=we(le,Rt.value,Se),Rt!==null&&(oe=T(Rt,oe,pt),At===null?tt=Rt:At.sibling=Rt,At=Rt);return kt&&In(le,pt),tt}for(We=m(We);!Rt.done;pt++,Rt=de.next())Rt=me(We,le,pt,Rt.value,Se),Rt!==null&&(r&&Rt.alternate!==null&&We.delete(Rt.key===null?pt:Rt.key),oe=T(Rt,oe,pt),At===null?tt=Rt:At.sibling=Rt,At=Rt);return r&&We.forEach(function(uE){return s(le,uE)}),kt&&In(le,pt),tt}function zt(le,oe,de,Se){if(typeof de=="object"&&de!==null&&de.type===w&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case S:e:{for(var tt=de.key;oe!==null;){if(oe.key===tt){if(tt=de.type,tt===w){if(oe.tag===7){c(le,oe.sibling),Se=E(oe,de.props.children),Se.return=le,le=Se;break e}}else if(oe.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===R&&ya(tt)===oe.type){c(le,oe.sibling),Se=E(oe,de.props),$c(Se,de),Se.return=le,le=Se;break e}c(le,oe);break}else s(le,oe);oe=oe.sibling}de.type===w?(Se=dr(de.props.children,le.mode,Se,de.key),Se.return=le,le=Se):(Se=yi(de.type,de.key,de.props,null,le.mode,Se),$c(Se,de),Se.return=le,le=Se)}return P(le);case C:e:{for(tt=de.key;oe!==null;){if(oe.key===tt)if(oe.tag===4&&oe.stateNode.containerInfo===de.containerInfo&&oe.stateNode.implementation===de.implementation){c(le,oe.sibling),Se=E(oe,de.children||[]),Se.return=le,le=Se;break e}else{c(le,oe);break}else s(le,oe);oe=oe.sibling}Se=Hi(de,le.mode,Se),Se.return=le,le=Se}return P(le);case R:return de=ya(de),zt(le,oe,de,Se)}if(K(de))return Fe(le,oe,de,Se);if(q(de)){if(tt=q(de),typeof tt!="function")throw Error(i(150));return de=tt.call(de),lt(le,oe,de,Se)}if(typeof de.then=="function")return zt(le,oe,Sd(de),Se);if(de.$$typeof===x)return zt(le,oe,_d(le,de),Se);wd(le,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,oe!==null&&oe.tag===6?(c(le,oe.sibling),Se=E(oe,de),Se.return=le,le=Se):(c(le,oe),Se=Fi(de,le.mode,Se),Se.return=le,le=Se),P(le)):c(le,oe)}return function(le,oe,de,Se){try{Uc=0;var tt=zt(le,oe,de,Se);return xl=null,tt}catch(We){if(We===bl||We===bd)throw We;var At=vn(29,We,null,le.mode);return At.lanes=Se,At.return=le,At}finally{}}}var xa=Dv(!0),Mv=Dv(!1),no=!1;function sp(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function op(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ro(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function io(r,s,c){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(Dt&2)!==0){var E=m.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),m.pending=s,s=gn(r),Vn(r,null,c),s}return $e(r,m,s,c),gn(r)}function qc(r,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var m=s.lanes;m&=r.pendingLanes,c|=m,s.lanes=c,ai(r,c)}}function ap(r,s){var c=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var E=null,T=null;if(c=c.firstBaseUpdate,c!==null){do{var P={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};T===null?E=T=P:T=T.next=P,c=c.next}while(c!==null);T===null?E=T=s:T=T.next=s}else E=T=s;c={baseState:m.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:m.shared,callbacks:m.callbacks},r.updateQueue=c;return}r=c.lastBaseUpdate,r===null?c.firstBaseUpdate=s:r.next=s,c.lastBaseUpdate=s}var lp=!1;function Vc(){if(lp){var r=yl;if(r!==null)throw r}}function Wc(r,s,c,m){lp=!1;var E=r.updateQueue;no=!1;var T=E.firstBaseUpdate,P=E.lastBaseUpdate,X=E.shared.pending;if(X!==null){E.shared.pending=null;var re=X,fe=re.next;re.next=null,P===null?T=fe:P.next=fe,P=re;var ye=r.alternate;ye!==null&&(ye=ye.updateQueue,X=ye.lastBaseUpdate,X!==P&&(X===null?ye.firstBaseUpdate=fe:X.next=fe,ye.lastBaseUpdate=re))}if(T!==null){var we=E.baseState;P=0,ye=fe=re=null,X=T;do{var he=X.lane&-536870913,me=he!==X.lane;if(me?(wt&he)===he:(m&he)===he){he!==0&&he===_l&&(lp=!0),ye!==null&&(ye=ye.next={lane:0,tag:X.tag,payload:X.payload,callback:null,next:null});e:{var Fe=r,lt=X;he=s;var zt=c;switch(lt.tag){case 1:if(Fe=lt.payload,typeof Fe=="function"){we=Fe.call(zt,we,he);break e}we=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=lt.payload,he=typeof Fe=="function"?Fe.call(zt,we,he):Fe,he==null)break e;we=h({},we,he);break e;case 2:no=!0}}he=X.callback,he!==null&&(r.flags|=64,me&&(r.flags|=8192),me=E.callbacks,me===null?E.callbacks=[he]:me.push(he))}else me={lane:he,tag:X.tag,payload:X.payload,callback:X.callback,next:null},ye===null?(fe=ye=me,re=we):ye=ye.next=me,P|=he;if(X=X.next,X===null){if(X=E.shared.pending,X===null)break;me=X,X=me.next,me.next=null,E.lastBaseUpdate=me,E.shared.pending=null}}while(!0);ye===null&&(re=we),E.baseState=re,E.firstBaseUpdate=fe,E.lastBaseUpdate=ye,T===null&&(E.shared.lanes=0),co|=P,r.lanes=P,r.memoizedState=we}}function jv(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function Ov(r,s){var c=r.callbacks;if(c!==null)for(r.callbacks=null,r=0;r<c.length;r++)jv(c[r],s)}var Sl=z(null),Cd=z(0);function Lv(r,s){r=ks,F(Cd,r),F(Sl,s),ks=r|s.baseLanes}function cp(){F(Cd,ks),F(Sl,Sl.current)}function up(){ks=Cd.current,H(Sl),H(Cd)}var Tr=z(null),Jr=null;function so(r){var s=r.alternate;F(rn,rn.current&1),F(Tr,r),Jr===null&&(s===null||Sl.current!==null||s.memoizedState!==null)&&(Jr=r)}function dp(r){F(rn,rn.current),F(Tr,r),Jr===null&&(Jr=r)}function Iv(r){r.tag===22?(F(rn,rn.current),F(Tr,r),Jr===null&&(Jr=r)):oo()}function oo(){F(rn,rn.current),F(Tr,Tr.current)}function Nr(r){H(Tr),Jr===r&&(Jr=null),H(rn)}var rn=z(0);function kd(r){for(var s=r;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||vm(c)||_m(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var vs=0,ht=null,It=null,un=null,Ed=!1,wl=!1,Sa=!1,Ad=0,Gc=0,Cl=null,ek=0;function tn(){throw Error(i(321))}function fp(r,s){if(s===null)return!1;for(var c=0;c<s.length&&c<r.length;c++)if(!ln(r[c],s[c]))return!1;return!0}function hp(r,s,c,m,E,T){return vs=T,ht=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,G.H=r===null||r.memoizedState===null?y_:Rp,Sa=!1,T=c(m,E),Sa=!1,wl&&(T=zv(s,c,m,E)),Bv(r),T}function Bv(r){G.H=Xc;var s=It!==null&&It.next!==null;if(vs=0,un=It=ht=null,Ed=!1,Gc=0,Cl=null,s)throw Error(i(300));r===null||dn||(r=r.dependencies,r!==null&&vd(r)&&(dn=!0))}function zv(r,s,c,m){ht=r;var E=0;do{if(wl&&(Cl=null),Gc=0,wl=!1,25<=E)throw Error(i(301));if(E+=1,un=It=null,r.updateQueue!=null){var T=r.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}G.H=b_,T=s(c,m)}while(wl);return T}function tk(){var r=G.H,s=r.useState()[0];return s=typeof s.then=="function"?Kc(s):s,r=r.useState()[0],(It!==null?It.memoizedState:null)!==r&&(ht.flags|=1024),s}function pp(){var r=Ad!==0;return Ad=0,r}function mp(r,s,c){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~c}function gp(r){if(Ed){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ed=!1}vs=0,un=It=ht=null,wl=!1,Gc=Ad=0,Cl=null}function ir(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?ht.memoizedState=un=r:un=un.next=r,un}function sn(){if(It===null){var r=ht.alternate;r=r!==null?r.memoizedState:null}else r=It.next;var s=un===null?ht.memoizedState:un.next;if(s!==null)un=s,It=r;else{if(r===null)throw ht.alternate===null?Error(i(467)):Error(i(310));It=r,r={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},un===null?ht.memoizedState=un=r:un=un.next=r}return un}function Rd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kc(r){var s=Gc;return Gc+=1,Cl===null&&(Cl=[]),r=Rv(Cl,r,s),s=ht,(un===null?s.memoizedState:un.next)===null&&(s=s.alternate,G.H=s===null||s.memoizedState===null?y_:Rp),r}function Td(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Kc(r);if(r.$$typeof===x)return zn(r)}throw Error(i(438,String(r)))}function vp(r){var s=null,c=ht.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var m=ht.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(E){return E.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=Rd(),ht.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(r),m=0;m<r;m++)c[m]=O;return s.index++,c}function _s(r,s){return typeof s=="function"?s(r):s}function Nd(r){var s=sn();return _p(s,It,r)}function _p(r,s,c){var m=r.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=c;var E=r.baseQueue,T=m.pending;if(T!==null){if(E!==null){var P=E.next;E.next=T.next,T.next=P}s.baseQueue=E=T,m.pending=null}if(T=r.baseState,E===null)r.memoizedState=T;else{s=E.next;var X=P=null,re=null,fe=s,ye=!1;do{var we=fe.lane&-536870913;if(we!==fe.lane?(wt&we)===we:(vs&we)===we){var he=fe.revertLane;if(he===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),we===_l&&(ye=!0);else if((vs&he)===he){fe=fe.next,he===_l&&(ye=!0);continue}else we={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(X=re=we,P=T):re=re.next=we,ht.lanes|=he,co|=he;we=fe.action,Sa&&c(T,we),T=fe.hasEagerState?fe.eagerState:c(T,we)}else he={lane:we,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(X=re=he,P=T):re=re.next=he,ht.lanes|=we,co|=we;fe=fe.next}while(fe!==null&&fe!==s);if(re===null?P=T:re.next=X,!ln(T,r.memoizedState)&&(dn=!0,ye&&(c=yl,c!==null)))throw c;r.memoizedState=T,r.baseState=P,r.baseQueue=re,m.lastRenderedState=T}return E===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function yp(r){var s=sn(),c=s.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=r;var m=c.dispatch,E=c.pending,T=s.memoizedState;if(E!==null){c.pending=null;var P=E=E.next;do T=r(T,P.action),P=P.next;while(P!==E);ln(T,s.memoizedState)||(dn=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),c.lastRenderedState=T}return[T,m]}function Pv(r,s,c){var m=ht,E=sn(),T=kt;if(T){if(c===void 0)throw Error(i(407));c=c()}else c=s();var P=!ln((It||E).memoizedState,c);if(P&&(E.memoizedState=c,dn=!0),E=E.queue,Sp(Uv.bind(null,m,E,r),[r]),E.getSnapshot!==s||P||un!==null&&un.memoizedState.tag&1){if(m.flags|=2048,kl(9,{destroy:void 0},Hv.bind(null,m,E,c,s),null),Ht===null)throw Error(i(349));T||(vs&127)!==0||Fv(m,s,c)}return c}function Fv(r,s,c){r.flags|=16384,r={getSnapshot:s,value:c},s=ht.updateQueue,s===null?(s=Rd(),ht.updateQueue=s,s.stores=[r]):(c=s.stores,c===null?s.stores=[r]:c.push(r))}function Hv(r,s,c,m){s.value=c,s.getSnapshot=m,$v(s)&&qv(r)}function Uv(r,s,c){return c(function(){$v(s)&&qv(r)})}function $v(r){var s=r.getSnapshot;r=r.value;try{var c=s();return!ln(r,c)}catch{return!0}}function qv(r){var s=Xt(r,2);s!==null&&gr(s,r,2)}function bp(r){var s=ir();if(typeof r=="function"){var c=r;if(r=c(),Sa){Tt(!0);try{c()}finally{Tt(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:r},s}function Vv(r,s,c,m){return r.baseState=c,_p(r,It,typeof m=="function"?m:_s)}function nk(r,s,c,m,E){if(jd(r))throw Error(i(485));if(r=s.action,r!==null){var T={payload:E,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){T.listeners.push(P)}};G.T!==null?c(!0):T.isTransition=!1,m(T),c=s.pending,c===null?(T.next=s.pending=T,Wv(s,T)):(T.next=c.next,s.pending=c.next=T)}}function Wv(r,s){var c=s.action,m=s.payload,E=r.state;if(s.isTransition){var T=G.T,P={};G.T=P;try{var X=c(E,m),re=G.S;re!==null&&re(P,X),Gv(r,s,X)}catch(fe){xp(r,s,fe)}finally{T!==null&&P.types!==null&&(T.types=P.types),G.T=T}}else try{T=c(E,m),Gv(r,s,T)}catch(fe){xp(r,s,fe)}}function Gv(r,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(m){Kv(r,s,m)},function(m){return xp(r,s,m)}):Kv(r,s,c)}function Kv(r,s,c){s.status="fulfilled",s.value=c,Yv(s),r.state=c,s=r.pending,s!==null&&(c=s.next,c===s?r.pending=null:(c=c.next,s.next=c,Wv(r,c)))}function xp(r,s,c){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=c,Yv(s),s=s.next;while(s!==m)}r.action=null}function Yv(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function Xv(r,s){return s}function Qv(r,s){if(kt){var c=Ht.formState;if(c!==null){e:{var m=ht;if(kt){if(Vt){t:{for(var E=Vt,T=Zr;E.nodeType!==8;){if(!T){E=null;break t}if(E=ei(E.nextSibling),E===null){E=null;break t}}T=E.data,E=T==="F!"||T==="F"?E:null}if(E){Vt=ei(E.nextSibling),m=E.data==="F!";break e}}eo(m)}m=!1}m&&(s=c[0])}}return c=ir(),c.memoizedState=c.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xv,lastRenderedState:s},c.queue=m,c=g_.bind(null,ht,m),m.dispatch=c,m=bp(!1),T=Ap.bind(null,ht,!1,m.queue),m=ir(),E={state:s,dispatch:null,action:r,pending:null},m.queue=E,c=nk.bind(null,ht,E,T,c),E.dispatch=c,m.memoizedState=r,[s,c,!1]}function Zv(r){var s=sn();return Jv(s,It,r)}function Jv(r,s,c){if(s=_p(r,s,Xv)[0],r=Nd(_s)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Kc(s)}catch(P){throw P===bl?bd:P}else m=s;s=sn();var E=s.queue,T=E.dispatch;return c!==s.memoizedState&&(ht.flags|=2048,kl(9,{destroy:void 0},rk.bind(null,E,c),null)),[m,T,r]}function rk(r,s){r.action=s}function e_(r){var s=sn(),c=It;if(c!==null)return Jv(s,c,r);sn(),s=s.memoizedState,c=sn();var m=c.queue.dispatch;return c.memoizedState=r,[s,m,!1]}function kl(r,s,c,m){return r={tag:r,create:c,deps:m,inst:s,next:null},s=ht.updateQueue,s===null&&(s=Rd(),ht.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=r.next=r:(m=c.next,c.next=r,r.next=m,s.lastEffect=r),r}function t_(){return sn().memoizedState}function Dd(r,s,c,m){var E=ir();ht.flags|=r,E.memoizedState=kl(1|s,{destroy:void 0},c,m===void 0?null:m)}function Md(r,s,c,m){var E=sn();m=m===void 0?null:m;var T=E.memoizedState.inst;It!==null&&m!==null&&fp(m,It.memoizedState.deps)?E.memoizedState=kl(s,T,c,m):(ht.flags|=r,E.memoizedState=kl(1|s,T,c,m))}function n_(r,s){Dd(8390656,8,r,s)}function Sp(r,s){Md(2048,8,r,s)}function ik(r){ht.flags|=4;var s=ht.updateQueue;if(s===null)s=Rd(),ht.updateQueue=s,s.events=[r];else{var c=s.events;c===null?s.events=[r]:c.push(r)}}function r_(r){var s=sn().memoizedState;return ik({ref:s,nextImpl:r}),function(){if((Dt&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function i_(r,s){return Md(4,2,r,s)}function s_(r,s){return Md(4,4,r,s)}function o_(r,s){if(typeof s=="function"){r=r();var c=s(r);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function a_(r,s,c){c=c!=null?c.concat([r]):null,Md(4,4,o_.bind(null,s,r),c)}function wp(){}function l_(r,s){var c=sn();s=s===void 0?null:s;var m=c.memoizedState;return s!==null&&fp(s,m[1])?m[0]:(c.memoizedState=[r,s],r)}function c_(r,s){var c=sn();s=s===void 0?null:s;var m=c.memoizedState;if(s!==null&&fp(s,m[1]))return m[0];if(m=r(),Sa){Tt(!0);try{r()}finally{Tt(!1)}}return c.memoizedState=[m,s],m}function Cp(r,s,c){return c===void 0||(vs&1073741824)!==0&&(wt&261930)===0?r.memoizedState=s:(r.memoizedState=c,r=u0(),ht.lanes|=r,co|=r,c)}function u_(r,s,c,m){return ln(c,s)?c:Sl.current!==null?(r=Cp(r,c,m),ln(r,s)||(dn=!0),r):(vs&42)===0||(vs&1073741824)!==0&&(wt&261930)===0?(dn=!0,r.memoizedState=c):(r=u0(),ht.lanes|=r,co|=r,s)}function d_(r,s,c,m,E){var T=Y.p;Y.p=T!==0&&8>T?T:8;var P=G.T,X={};G.T=X,Ap(r,!1,s,c);try{var re=E(),fe=G.S;if(fe!==null&&fe(X,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var ye=J3(re,m);Yc(r,s,ye,jr(r))}else Yc(r,s,m,jr(r))}catch(we){Yc(r,s,{then:function(){},status:"rejected",reason:we},jr())}finally{Y.p=T,P!==null&&X.types!==null&&(P.types=X.types),G.T=P}}function sk(){}function kp(r,s,c,m){if(r.tag!==5)throw Error(i(476));var E=f_(r).queue;d_(r,E,s,Q,c===null?sk:function(){return h_(r),c(m)})}function f_(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:Q},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:c},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function h_(r){var s=f_(r);s.next===null&&(s=r.alternate.memoizedState),Yc(r,s.next.queue,{},jr())}function Ep(){return zn(fu)}function p_(){return sn().memoizedState}function m_(){return sn().memoizedState}function ok(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var c=jr();r=ro(c);var m=io(s,r,c);m!==null&&(gr(m,s,c),qc(m,s,c)),s={cache:tp()},r.payload=s;return}s=s.return}}function ak(r,s,c){var m=jr();c={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},jd(r)?v_(s,c):(c=vt(r,s,c,m),c!==null&&(gr(c,r,m),__(c,s,m)))}function g_(r,s,c){var m=jr();Yc(r,s,c,m)}function Yc(r,s,c,m){var E={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(jd(r))v_(s,E);else{var T=r.alternate;if(r.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var P=s.lastRenderedState,X=T(P,c);if(E.hasEagerState=!0,E.eagerState=X,ln(X,P))return $e(r,s,E,0),Ht===null&&ke(),!1}catch{}finally{}if(c=vt(r,s,E,m),c!==null)return gr(c,r,m),__(c,s,m),!0}return!1}function Ap(r,s,c,m){if(m={lane:2,revertLane:sm(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},jd(r)){if(s)throw Error(i(479))}else s=vt(r,c,m,2),s!==null&&gr(s,r,2)}function jd(r){var s=r.alternate;return r===ht||s!==null&&s===ht}function v_(r,s){wl=Ed=!0;var c=r.pending;c===null?s.next=s:(s.next=c.next,c.next=s),r.pending=s}function __(r,s,c){if((c&4194048)!==0){var m=s.lanes;m&=r.pendingLanes,c|=m,s.lanes=c,ai(r,c)}}var Xc={readContext:zn,use:Td,useCallback:tn,useContext:tn,useEffect:tn,useImperativeHandle:tn,useLayoutEffect:tn,useInsertionEffect:tn,useMemo:tn,useReducer:tn,useRef:tn,useState:tn,useDebugValue:tn,useDeferredValue:tn,useTransition:tn,useSyncExternalStore:tn,useId:tn,useHostTransitionStatus:tn,useFormState:tn,useActionState:tn,useOptimistic:tn,useMemoCache:tn,useCacheRefresh:tn};Xc.useEffectEvent=tn;var y_={readContext:zn,use:Td,useCallback:function(r,s){return ir().memoizedState=[r,s===void 0?null:s],r},useContext:zn,useEffect:n_,useImperativeHandle:function(r,s,c){c=c!=null?c.concat([r]):null,Dd(4194308,4,o_.bind(null,s,r),c)},useLayoutEffect:function(r,s){return Dd(4194308,4,r,s)},useInsertionEffect:function(r,s){Dd(4,2,r,s)},useMemo:function(r,s){var c=ir();s=s===void 0?null:s;var m=r();if(Sa){Tt(!0);try{r()}finally{Tt(!1)}}return c.memoizedState=[m,s],m},useReducer:function(r,s,c){var m=ir();if(c!==void 0){var E=c(s);if(Sa){Tt(!0);try{c(s)}finally{Tt(!1)}}}else E=s;return m.memoizedState=m.baseState=E,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:E},m.queue=r,r=r.dispatch=ak.bind(null,ht,r),[m.memoizedState,r]},useRef:function(r){var s=ir();return r={current:r},s.memoizedState=r},useState:function(r){r=bp(r);var s=r.queue,c=g_.bind(null,ht,s);return s.dispatch=c,[r.memoizedState,c]},useDebugValue:wp,useDeferredValue:function(r,s){var c=ir();return Cp(c,r,s)},useTransition:function(){var r=bp(!1);return r=d_.bind(null,ht,r.queue,!0,!1),ir().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,c){var m=ht,E=ir();if(kt){if(c===void 0)throw Error(i(407));c=c()}else{if(c=s(),Ht===null)throw Error(i(349));(wt&127)!==0||Fv(m,s,c)}E.memoizedState=c;var T={value:c,getSnapshot:s};return E.queue=T,n_(Uv.bind(null,m,T,r),[r]),m.flags|=2048,kl(9,{destroy:void 0},Hv.bind(null,m,T,c,s),null),c},useId:function(){var r=ir(),s=Ht.identifierPrefix;if(kt){var c=jt,m=Ln;c=(m&~(1<<32-be(m)-1)).toString(32)+c,s="_"+s+"R_"+c,c=Ad++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=ek++,s="_"+s+"r_"+c.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:Ep,useFormState:Qv,useActionState:Qv,useOptimistic:function(r){var s=ir();s.memoizedState=s.baseState=r;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=Ap.bind(null,ht,!0,c),c.dispatch=s,[r,s]},useMemoCache:vp,useCacheRefresh:function(){return ir().memoizedState=ok.bind(null,ht)},useEffectEvent:function(r){var s=ir(),c={impl:r};return s.memoizedState=c,function(){if((Dt&2)!==0)throw Error(i(440));return c.impl.apply(void 0,arguments)}}},Rp={readContext:zn,use:Td,useCallback:l_,useContext:zn,useEffect:Sp,useImperativeHandle:a_,useInsertionEffect:i_,useLayoutEffect:s_,useMemo:c_,useReducer:Nd,useRef:t_,useState:function(){return Nd(_s)},useDebugValue:wp,useDeferredValue:function(r,s){var c=sn();return u_(c,It.memoizedState,r,s)},useTransition:function(){var r=Nd(_s)[0],s=sn().memoizedState;return[typeof r=="boolean"?r:Kc(r),s]},useSyncExternalStore:Pv,useId:p_,useHostTransitionStatus:Ep,useFormState:Zv,useActionState:Zv,useOptimistic:function(r,s){var c=sn();return Vv(c,It,r,s)},useMemoCache:vp,useCacheRefresh:m_};Rp.useEffectEvent=r_;var b_={readContext:zn,use:Td,useCallback:l_,useContext:zn,useEffect:Sp,useImperativeHandle:a_,useInsertionEffect:i_,useLayoutEffect:s_,useMemo:c_,useReducer:yp,useRef:t_,useState:function(){return yp(_s)},useDebugValue:wp,useDeferredValue:function(r,s){var c=sn();return It===null?Cp(c,r,s):u_(c,It.memoizedState,r,s)},useTransition:function(){var r=yp(_s)[0],s=sn().memoizedState;return[typeof r=="boolean"?r:Kc(r),s]},useSyncExternalStore:Pv,useId:p_,useHostTransitionStatus:Ep,useFormState:e_,useActionState:e_,useOptimistic:function(r,s){var c=sn();return It!==null?Vv(c,It,r,s):(c.baseState=r,[r,c.queue.dispatch])},useMemoCache:vp,useCacheRefresh:m_};b_.useEffectEvent=r_;function Tp(r,s,c,m){s=r.memoizedState,c=c(m,s),c=c==null?s:h({},s,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var Np={enqueueSetState:function(r,s,c){r=r._reactInternals;var m=jr(),E=ro(m);E.payload=s,c!=null&&(E.callback=c),s=io(r,E,m),s!==null&&(gr(s,r,m),qc(s,r,m))},enqueueReplaceState:function(r,s,c){r=r._reactInternals;var m=jr(),E=ro(m);E.tag=1,E.payload=s,c!=null&&(E.callback=c),s=io(r,E,m),s!==null&&(gr(s,r,m),qc(s,r,m))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var c=jr(),m=ro(c);m.tag=2,s!=null&&(m.callback=s),s=io(r,m,c),s!==null&&(gr(s,r,c),qc(s,r,c))}};function x_(r,s,c,m,E,T,P){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,T,P):s.prototype&&s.prototype.isPureReactComponent?!ut(c,m)||!ut(E,T):!0}function S_(r,s,c,m){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==r&&Np.enqueueReplaceState(s,s.state,null)}function wa(r,s){var c=s;if("ref"in s){c={};for(var m in s)m!=="ref"&&(c[m]=s[m])}if(r=r.defaultProps){c===s&&(c=h({},c));for(var E in r)c[E]===void 0&&(c[E]=r[E])}return c}function w_(r){Re(r)}function C_(r){console.error(r)}function k_(r){Re(r)}function Od(r,s){try{var c=r.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function E_(r,s,c){try{var m=r.onCaughtError;m(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Dp(r,s,c){return c=ro(c),c.tag=3,c.payload={element:null},c.callback=function(){Od(r,s)},c}function A_(r){return r=ro(r),r.tag=3,r}function R_(r,s,c,m){var E=c.type.getDerivedStateFromError;if(typeof E=="function"){var T=m.value;r.payload=function(){return E(T)},r.callback=function(){E_(s,c,m)}}var P=c.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(r.callback=function(){E_(s,c,m),typeof E!="function"&&(uo===null?uo=new Set([this]):uo.add(this));var X=m.stack;this.componentDidCatch(m.value,{componentStack:X!==null?X:""})})}function lk(r,s,c,m,E){if(c.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=c.alternate,s!==null&&vl(s,c,E,!0),c=Tr.current,c!==null){switch(c.tag){case 31:case 13:return Jr===null?Wd():c.alternate===null&&nn===0&&(nn=3),c.flags&=-257,c.flags|=65536,c.lanes=E,m===xd?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([m]):s.add(m),nm(r,m,E)),!1;case 22:return c.flags|=65536,m===xd?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([m]):c.add(m)),nm(r,m,E)),!1}throw Error(i(435,c.tag))}return nm(r,m,E),Wd(),!1}if(kt)return s=Tr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=E,m!==Xh&&(r=Error(i(422),{cause:m}),Pc(_n(r,c)))):(m!==Xh&&(s=Error(i(423),{cause:m}),Pc(_n(s,c))),r=r.current.alternate,r.flags|=65536,E&=-E,r.lanes|=E,m=_n(m,c),E=Dp(r.stateNode,m,E),ap(r,E),nn!==4&&(nn=2)),!1;var T=Error(i(520),{cause:m});if(T=_n(T,c),iu===null?iu=[T]:iu.push(T),nn!==4&&(nn=2),s===null)return!0;m=_n(m,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,r=E&-E,c.lanes|=r,r=Dp(c.stateNode,m,r),ap(c,r),!1;case 1:if(s=c.type,T=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(uo===null||!uo.has(T))))return c.flags|=65536,E&=-E,c.lanes|=E,E=A_(E),R_(E,r,c,m),ap(c,E),!1}c=c.return}while(c!==null);return!1}var Mp=Error(i(461)),dn=!1;function Pn(r,s,c,m){s.child=r===null?Mv(s,null,c,m):xa(s,r.child,c,m)}function T_(r,s,c,m,E){c=c.render;var T=s.ref;if("ref"in m){var P={};for(var X in m)X!=="ref"&&(P[X]=m[X])}else P=m;return va(s),m=hp(r,s,c,P,T,E),X=pp(),r!==null&&!dn?(mp(r,s,E),ys(r,s,E)):(kt&&X&&zc(s),s.flags|=1,Pn(r,s,m,E),s.child)}function N_(r,s,c,m,E){if(r===null){var T=c.type;return typeof T=="function"&&!Ic(T)&&T.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=T,D_(r,s,T,m,E)):(r=yi(c.type,null,m,s,s.mode,E),r.ref=s.ref,r.return=s,s.child=r)}if(T=r.child,!Fp(r,E)){var P=T.memoizedProps;if(c=c.compare,c=c!==null?c:ut,c(P,m)&&r.ref===s.ref)return ys(r,s,E)}return s.flags|=1,r=_i(T,m),r.ref=s.ref,r.return=s,s.child=r}function D_(r,s,c,m,E){if(r!==null){var T=r.memoizedProps;if(ut(T,m)&&r.ref===s.ref)if(dn=!1,s.pendingProps=m=T,Fp(r,E))(r.flags&131072)!==0&&(dn=!0);else return s.lanes=r.lanes,ys(r,s,E)}return jp(r,s,c,m,E)}function M_(r,s,c,m){var E=m.children,T=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(T=T!==null?T.baseLanes|c:c,r!==null){for(m=s.child=r.child,E=0;m!==null;)E=E|m.lanes|m.childLanes,m=m.sibling;m=E&~T}else m=0,s.child=null;return j_(r,s,T,c,m)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&yd(s,T!==null?T.cachePool:null),T!==null?Lv(s,T):cp(),Iv(s);else return m=s.lanes=536870912,j_(r,s,T!==null?T.baseLanes|c:c,c,m)}else T!==null?(yd(s,T.cachePool),Lv(s,T),oo(),s.memoizedState=null):(r!==null&&yd(s,null),cp(),oo());return Pn(r,s,E,c),s.child}function Qc(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function j_(r,s,c,m,E){var T=rp();return T=T===null?null:{parent:cn._currentValue,pool:T},s.memoizedState={baseLanes:c,cachePool:T},r!==null&&yd(s,null),cp(),Iv(s),r!==null&&vl(r,s,m,!0),s.childLanes=E,null}function Ld(r,s){return s=Bd({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function O_(r,s,c){return xa(s,r.child,null,c),r=Ld(s,s.pendingProps),r.flags|=2,Nr(s),s.memoizedState=null,r}function ck(r,s,c){var m=s.pendingProps,E=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(kt){if(m.mode==="hidden")return r=Ld(s,m),s.lanes=536870912,Qc(null,r);if(dp(s),(r=Vt)?(r=W0(r,Zr),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:rr!==null?{id:Ln,overflow:jt}:null,retryLane:536870912,hydrationErrors:null},c=hs(r),c.return=s,s.child=c,Bn=s,Vt=null)):r=null,r===null)throw eo(s);return s.lanes=536870912,null}return Ld(s,m)}var T=r.memoizedState;if(T!==null){var P=T.dehydrated;if(dp(s),E)if(s.flags&256)s.flags&=-257,s=O_(r,s,c);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(dn||vl(r,s,c,!1),E=(c&r.childLanes)!==0,dn||E){if(m=Ht,m!==null&&(P=Ur(m,c),P!==0&&P!==T.retryLane))throw T.retryLane=P,Xt(r,P),gr(m,r,P),Mp;Wd(),s=O_(r,s,c)}else r=T.treeContext,Vt=ei(P.nextSibling),Bn=s,kt=!0,Js=null,Zr=!1,r!==null&&bv(s,r),s=Ld(s,m),s.flags|=4096;return s}return r=_i(r.child,{mode:m.mode,children:m.children}),r.ref=s.ref,s.child=r,r.return=s,r}function Id(r,s){var c=s.ref;if(c===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(i(284));(r===null||r.ref!==c)&&(s.flags|=4194816)}}function jp(r,s,c,m,E){return va(s),c=hp(r,s,c,m,void 0,E),m=pp(),r!==null&&!dn?(mp(r,s,E),ys(r,s,E)):(kt&&m&&zc(s),s.flags|=1,Pn(r,s,c,E),s.child)}function L_(r,s,c,m,E,T){return va(s),s.updateQueue=null,c=zv(s,m,c,E),Bv(r),m=pp(),r!==null&&!dn?(mp(r,s,T),ys(r,s,T)):(kt&&m&&zc(s),s.flags|=1,Pn(r,s,c,T),s.child)}function I_(r,s,c,m,E){if(va(s),s.stateNode===null){var T=Wn,P=c.contextType;typeof P=="object"&&P!==null&&(T=zn(P)),T=new c(m,T),s.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Np,s.stateNode=T,T._reactInternals=s,T=s.stateNode,T.props=m,T.state=s.memoizedState,T.refs={},sp(s),P=c.contextType,T.context=typeof P=="object"&&P!==null?zn(P):Wn,T.state=s.memoizedState,P=c.getDerivedStateFromProps,typeof P=="function"&&(Tp(s,c,P,m),T.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(P=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),P!==T.state&&Np.enqueueReplaceState(T,T.state,null),Wc(s,m,T,E),Vc(),T.state=s.memoizedState),typeof T.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(r===null){T=s.stateNode;var X=s.memoizedProps,re=wa(c,X);T.props=re;var fe=T.context,ye=c.contextType;P=Wn,typeof ye=="object"&&ye!==null&&(P=zn(ye));var we=c.getDerivedStateFromProps;ye=typeof we=="function"||typeof T.getSnapshotBeforeUpdate=="function",X=s.pendingProps!==X,ye||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(X||fe!==P)&&S_(s,T,m,P),no=!1;var he=s.memoizedState;T.state=he,Wc(s,m,T,E),Vc(),fe=s.memoizedState,X||he!==fe||no?(typeof we=="function"&&(Tp(s,c,we,m),fe=s.memoizedState),(re=no||x_(s,c,re,m,he,fe,P))?(ye||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(s.flags|=4194308)):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=fe),T.props=m,T.state=fe,T.context=P,m=re):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{T=s.stateNode,op(r,s),P=s.memoizedProps,ye=wa(c,P),T.props=ye,we=s.pendingProps,he=T.context,fe=c.contextType,re=Wn,typeof fe=="object"&&fe!==null&&(re=zn(fe)),X=c.getDerivedStateFromProps,(fe=typeof X=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(P!==we||he!==re)&&S_(s,T,m,re),no=!1,he=s.memoizedState,T.state=he,Wc(s,m,T,E),Vc();var me=s.memoizedState;P!==we||he!==me||no||r!==null&&r.dependencies!==null&&vd(r.dependencies)?(typeof X=="function"&&(Tp(s,c,X,m),me=s.memoizedState),(ye=no||x_(s,c,ye,m,he,me,re)||r!==null&&r.dependencies!==null&&vd(r.dependencies))?(fe||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(m,me,re),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(m,me,re)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||P===r.memoizedProps&&he===r.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||P===r.memoizedProps&&he===r.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=me),T.props=m,T.state=me,T.context=re,m=ye):(typeof T.componentDidUpdate!="function"||P===r.memoizedProps&&he===r.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||P===r.memoizedProps&&he===r.memoizedState||(s.flags|=1024),m=!1)}return T=m,Id(r,s),m=(s.flags&128)!==0,T||m?(T=s.stateNode,c=m&&typeof c.getDerivedStateFromError!="function"?null:T.render(),s.flags|=1,r!==null&&m?(s.child=xa(s,r.child,null,E),s.child=xa(s,null,c,E)):Pn(r,s,c,E),s.memoizedState=T.state,r=s.child):r=ys(r,s,E),r}function B_(r,s,c,m){return ma(),s.flags|=256,Pn(r,s,c,m),s.child}var Op={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lp(r){return{baseLanes:r,cachePool:Ev()}}function Ip(r,s,c){return r=r!==null?r.childLanes&~c:0,s&&(r|=Mr),r}function z_(r,s,c){var m=s.pendingProps,E=!1,T=(s.flags&128)!==0,P;if((P=T)||(P=r!==null&&r.memoizedState===null?!1:(rn.current&2)!==0),P&&(E=!0,s.flags&=-129),P=(s.flags&32)!==0,s.flags&=-33,r===null){if(kt){if(E?so(s):oo(),(r=Vt)?(r=W0(r,Zr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:rr!==null?{id:Ln,overflow:jt}:null,retryLane:536870912,hydrationErrors:null},c=hs(r),c.return=s,s.child=c,Bn=s,Vt=null)):r=null,r===null)throw eo(s);return _m(r)?s.lanes=32:s.lanes=536870912,null}var X=m.children;return m=m.fallback,E?(oo(),E=s.mode,X=Bd({mode:"hidden",children:X},E),m=dr(m,E,c,null),X.return=s,m.return=s,X.sibling=m,s.child=X,m=s.child,m.memoizedState=Lp(c),m.childLanes=Ip(r,P,c),s.memoizedState=Op,Qc(null,m)):(so(s),Bp(s,X))}var re=r.memoizedState;if(re!==null&&(X=re.dehydrated,X!==null)){if(T)s.flags&256?(so(s),s.flags&=-257,s=zp(r,s,c)):s.memoizedState!==null?(oo(),s.child=r.child,s.flags|=128,s=null):(oo(),X=m.fallback,E=s.mode,m=Bd({mode:"visible",children:m.children},E),X=dr(X,E,c,null),X.flags|=2,m.return=s,X.return=s,m.sibling=X,s.child=m,xa(s,r.child,null,c),m=s.child,m.memoizedState=Lp(c),m.childLanes=Ip(r,P,c),s.memoizedState=Op,s=Qc(null,m));else if(so(s),_m(X)){if(P=X.nextSibling&&X.nextSibling.dataset,P)var fe=P.dgst;P=fe,m=Error(i(419)),m.stack="",m.digest=P,Pc({value:m,source:null,stack:null}),s=zp(r,s,c)}else if(dn||vl(r,s,c,!1),P=(c&r.childLanes)!==0,dn||P){if(P=Ht,P!==null&&(m=Ur(P,c),m!==0&&m!==re.retryLane))throw re.retryLane=m,Xt(r,m),gr(P,r,m),Mp;vm(X)||Wd(),s=zp(r,s,c)}else vm(X)?(s.flags|=192,s.child=r.child,s=null):(r=re.treeContext,Vt=ei(X.nextSibling),Bn=s,kt=!0,Js=null,Zr=!1,r!==null&&bv(s,r),s=Bp(s,m.children),s.flags|=4096);return s}return E?(oo(),X=m.fallback,E=s.mode,re=r.child,fe=re.sibling,m=_i(re,{mode:"hidden",children:m.children}),m.subtreeFlags=re.subtreeFlags&65011712,fe!==null?X=_i(fe,X):(X=dr(X,E,c,null),X.flags|=2),X.return=s,m.return=s,m.sibling=X,s.child=m,Qc(null,m),m=s.child,X=r.child.memoizedState,X===null?X=Lp(c):(E=X.cachePool,E!==null?(re=cn._currentValue,E=E.parent!==re?{parent:re,pool:re}:E):E=Ev(),X={baseLanes:X.baseLanes|c,cachePool:E}),m.memoizedState=X,m.childLanes=Ip(r,P,c),s.memoizedState=Op,Qc(r.child,m)):(so(s),c=r.child,r=c.sibling,c=_i(c,{mode:"visible",children:m.children}),c.return=s,c.sibling=null,r!==null&&(P=s.deletions,P===null?(s.deletions=[r],s.flags|=16):P.push(r)),s.child=c,s.memoizedState=null,c)}function Bp(r,s){return s=Bd({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function Bd(r,s){return r=vn(22,r,null,s),r.lanes=0,r}function zp(r,s,c){return xa(s,r.child,null,c),r=Bp(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function P_(r,s,c){r.lanes|=s;var m=r.alternate;m!==null&&(m.lanes|=s),Jh(r.return,s,c)}function Pp(r,s,c,m,E,T){var P=r.memoizedState;P===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:E,treeForkCount:T}:(P.isBackwards=s,P.rendering=null,P.renderingStartTime=0,P.last=m,P.tail=c,P.tailMode=E,P.treeForkCount=T)}function F_(r,s,c){var m=s.pendingProps,E=m.revealOrder,T=m.tail;m=m.children;var P=rn.current,X=(P&2)!==0;if(X?(P=P&1|2,s.flags|=128):P&=1,F(rn,P),Pn(r,s,m,c),m=kt?Qr:0,!X&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&P_(r,c,s);else if(r.tag===19)P_(r,c,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(E){case"forwards":for(c=s.child,E=null;c!==null;)r=c.alternate,r!==null&&kd(r)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),Pp(s,!1,E,c,T,m);break;case"backwards":case"unstable_legacy-backwards":for(c=null,E=s.child,s.child=null;E!==null;){if(r=E.alternate,r!==null&&kd(r)===null){s.child=E;break}r=E.sibling,E.sibling=c,c=E,E=r}Pp(s,!0,c,null,T,m);break;case"together":Pp(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function ys(r,s,c){if(r!==null&&(s.dependencies=r.dependencies),co|=s.lanes,(c&s.childLanes)===0)if(r!==null){if(vl(r,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(i(153));if(s.child!==null){for(r=s.child,c=_i(r,r.pendingProps),s.child=c,c.return=s;r.sibling!==null;)r=r.sibling,c=c.sibling=_i(r,r.pendingProps),c.return=s;c.sibling=null}return s.child}function Fp(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&vd(r)))}function uk(r,s,c){switch(s.tag){case 3:U(s,s.stateNode.containerInfo),to(s,cn,r.memoizedState.cache),ma();break;case 27:case 5:ie(s);break;case 4:U(s,s.stateNode.containerInfo);break;case 10:to(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,dp(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(so(s),s.flags|=128,null):(c&s.child.childLanes)!==0?z_(r,s,c):(so(s),r=ys(r,s,c),r!==null?r.sibling:null);so(s);break;case 19:var E=(r.flags&128)!==0;if(m=(c&s.childLanes)!==0,m||(vl(r,s,c,!1),m=(c&s.childLanes)!==0),E){if(m)return F_(r,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),F(rn,rn.current),m)break;return null;case 22:return s.lanes=0,M_(r,s,c,s.pendingProps);case 24:to(s,cn,r.memoizedState.cache)}return ys(r,s,c)}function H_(r,s,c){if(r!==null)if(r.memoizedProps!==s.pendingProps)dn=!0;else{if(!Fp(r,c)&&(s.flags&128)===0)return dn=!1,uk(r,s,c);dn=(r.flags&131072)!==0}else dn=!1,kt&&(s.flags&1048576)!==0&&Bc(s,Qr,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(r=ya(s.elementType),s.type=r,typeof r=="function")Ic(r)?(m=wa(r,m),s.tag=1,s=I_(null,s,r,m,c)):(s.tag=0,s=jp(null,s,r,m,c));else{if(r!=null){var E=r.$$typeof;if(E===k){s.tag=11,s=T_(null,s,r,m,c);break e}else if(E===M){s.tag=14,s=N_(null,s,r,m,c);break e}}throw s=V(r)||r,Error(i(306,s,""))}}return s;case 0:return jp(r,s,s.type,s.pendingProps,c);case 1:return m=s.type,E=wa(m,s.pendingProps),I_(r,s,m,E,c);case 3:e:{if(U(s,s.stateNode.containerInfo),r===null)throw Error(i(387));m=s.pendingProps;var T=s.memoizedState;E=T.element,op(r,s),Wc(s,m,null,c);var P=s.memoizedState;if(m=P.cache,to(s,cn,m),m!==T.cache&&ep(s,[cn],c,!0),Vc(),m=P.element,T.isDehydrated)if(T={element:m,isDehydrated:!1,cache:P.cache},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){s=B_(r,s,m,c);break e}else if(m!==E){E=_n(Error(i(424)),s),Pc(E),s=B_(r,s,m,c);break e}else{switch(r=s.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Vt=ei(r.firstChild),Bn=s,kt=!0,Js=null,Zr=!0,c=Mv(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(ma(),m===E){s=ys(r,s,c);break e}Pn(r,s,m,c)}s=s.child}return s;case 26:return Id(r,s),r===null?(c=Z0(s.type,null,s.pendingProps,null))?s.memoizedState=c:kt||(c=s.type,r=s.pendingProps,m=Jd(Z.current).createElement(c),m[Nt]=s,m[en]=r,Fn(m,c,r),Mt(m),s.stateNode=m):s.memoizedState=Z0(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return ie(s),r===null&&kt&&(m=s.stateNode=Y0(s.type,s.pendingProps,Z.current),Bn=s,Zr=!0,E=Vt,mo(s.type)?(ym=E,Vt=ei(m.firstChild)):Vt=E),Pn(r,s,s.pendingProps.children,c),Id(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&kt&&((E=m=Vt)&&(m=Fk(m,s.type,s.pendingProps,Zr),m!==null?(s.stateNode=m,Bn=s,Vt=ei(m.firstChild),Zr=!1,E=!0):E=!1),E||eo(s)),ie(s),E=s.type,T=s.pendingProps,P=r!==null?r.memoizedProps:null,m=T.children,pm(E,T)?m=null:P!==null&&pm(E,P)&&(s.flags|=32),s.memoizedState!==null&&(E=hp(r,s,tk,null,null,c),fu._currentValue=E),Id(r,s),Pn(r,s,m,c),s.child;case 6:return r===null&&kt&&((r=c=Vt)&&(c=Hk(c,s.pendingProps,Zr),c!==null?(s.stateNode=c,Bn=s,Vt=null,r=!0):r=!1),r||eo(s)),null;case 13:return z_(r,s,c);case 4:return U(s,s.stateNode.containerInfo),m=s.pendingProps,r===null?s.child=xa(s,null,m,c):Pn(r,s,m,c),s.child;case 11:return T_(r,s,s.type,s.pendingProps,c);case 7:return Pn(r,s,s.pendingProps,c),s.child;case 8:return Pn(r,s,s.pendingProps.children,c),s.child;case 12:return Pn(r,s,s.pendingProps.children,c),s.child;case 10:return m=s.pendingProps,to(s,s.type,m.value),Pn(r,s,m.children,c),s.child;case 9:return E=s.type._context,m=s.pendingProps.children,va(s),E=zn(E),m=m(E),s.flags|=1,Pn(r,s,m,c),s.child;case 14:return N_(r,s,s.type,s.pendingProps,c);case 15:return D_(r,s,s.type,s.pendingProps,c);case 19:return F_(r,s,c);case 31:return ck(r,s,c);case 22:return M_(r,s,c,s.pendingProps);case 24:return va(s),m=zn(cn),r===null?(E=rp(),E===null&&(E=Ht,T=tp(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=c),E=T),s.memoizedState={parent:m,cache:E},sp(s),to(s,cn,E)):((r.lanes&c)!==0&&(op(r,s),Wc(s,null,null,c),Vc()),E=r.memoizedState,T=s.memoizedState,E.parent!==m?(E={parent:m,cache:m},s.memoizedState=E,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=E),to(s,cn,m)):(m=T.cache,to(s,cn,m),m!==E.cache&&ep(s,[cn],c,!0))),Pn(r,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function bs(r){r.flags|=4}function Hp(r,s,c,m,E){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(E&335544128)===E)if(r.stateNode.complete)r.flags|=8192;else if(p0())r.flags|=8192;else throw ba=xd,ip}else r.flags&=-16777217}function U_(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!ry(s))if(p0())r.flags|=8192;else throw ba=xd,ip}function zd(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?on():536870912,r.lanes|=s,Tl|=s)}function Zc(r,s){if(!kt)switch(r.tailMode){case"hidden":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?r.tail=null:c.sibling=null;break;case"collapsed":c=r.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:m.sibling=null}}function Wt(r){var s=r.alternate!==null&&r.alternate.child===r.child,c=0,m=0;if(s)for(var E=r.child;E!==null;)c|=E.lanes|E.childLanes,m|=E.subtreeFlags&65011712,m|=E.flags&65011712,E.return=r,E=E.sibling;else for(E=r.child;E!==null;)c|=E.lanes|E.childLanes,m|=E.subtreeFlags,m|=E.flags,E.return=r,E=E.sibling;return r.subtreeFlags|=m,r.childLanes=c,s}function dk(r,s,c){var m=s.pendingProps;switch(Yh(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(s),null;case 1:return Wt(s),null;case 3:return c=s.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),gs(cn),te(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(gl(s)?bs(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Qh())),Wt(s),null;case 26:var E=s.type,T=s.memoizedState;return r===null?(bs(s),T!==null?(Wt(s),U_(s,T)):(Wt(s),Hp(s,E,null,m,c))):T?T!==r.memoizedState?(bs(s),Wt(s),U_(s,T)):(Wt(s),s.flags&=-16777217):(r=r.memoizedProps,r!==m&&bs(s),Wt(s),Hp(s,E,r,m,c)),null;case 27:if(ae(s),c=Z.current,E=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&bs(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return Wt(s),null}r=J.current,gl(s)?xv(s):(r=Y0(E,m,c),s.stateNode=r,bs(s))}return Wt(s),null;case 5:if(ae(s),E=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&bs(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return Wt(s),null}if(T=J.current,gl(s))xv(s);else{var P=Jd(Z.current);switch(T){case 1:T=P.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:T=P.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":T=P.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":T=P.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":T=P.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof m.is=="string"?P.createElement("select",{is:m.is}):P.createElement("select"),m.multiple?T.multiple=!0:m.size&&(T.size=m.size);break;default:T=typeof m.is=="string"?P.createElement(E,{is:m.is}):P.createElement(E)}}T[Nt]=s,T[en]=m;e:for(P=s.child;P!==null;){if(P.tag===5||P.tag===6)T.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===s)break e;for(;P.sibling===null;){if(P.return===null||P.return===s)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}s.stateNode=T;e:switch(Fn(T,E,m),E){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&bs(s)}}return Wt(s),Hp(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,c),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==m&&bs(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(i(166));if(r=Z.current,gl(s)){if(r=s.stateNode,c=s.memoizedProps,m=null,E=Bn,E!==null)switch(E.tag){case 27:case 5:m=E.memoizedProps}r[Nt]=s,r=!!(r.nodeValue===c||m!==null&&m.suppressHydrationWarning===!0||z0(r.nodeValue,c)),r||eo(s,!0)}else r=Jd(r).createTextNode(m),r[Nt]=s,s.stateNode=r}return Wt(s),null;case 31:if(c=s.memoizedState,r===null||r.memoizedState!==null){if(m=gl(s),c!==null){if(r===null){if(!m)throw Error(i(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Nt]=s}else ma(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Wt(s),r=!1}else c=Qh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=c),r=!0;if(!r)return s.flags&256?(Nr(s),s):(Nr(s),null);if((s.flags&128)!==0)throw Error(i(558))}return Wt(s),null;case 13:if(m=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(E=gl(s),m!==null&&m.dehydrated!==null){if(r===null){if(!E)throw Error(i(318));if(E=s.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(i(317));E[Nt]=s}else ma(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Wt(s),E=!1}else E=Qh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=E),E=!0;if(!E)return s.flags&256?(Nr(s),s):(Nr(s),null)}return Nr(s),(s.flags&128)!==0?(s.lanes=c,s):(c=m!==null,r=r!==null&&r.memoizedState!==null,c&&(m=s.child,E=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(E=m.alternate.memoizedState.cachePool.pool),T=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(T=m.memoizedState.cachePool.pool),T!==E&&(m.flags|=2048)),c!==r&&c&&(s.child.flags|=8192),zd(s,s.updateQueue),Wt(s),null);case 4:return te(),r===null&&cm(s.stateNode.containerInfo),Wt(s),null;case 10:return gs(s.type),Wt(s),null;case 19:if(H(rn),m=s.memoizedState,m===null)return Wt(s),null;if(E=(s.flags&128)!==0,T=m.rendering,T===null)if(E)Zc(m,!1);else{if(nn!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(T=kd(r),T!==null){for(s.flags|=128,Zc(m,!1),r=T.updateQueue,s.updateQueue=r,zd(s,r),s.subtreeFlags=0,r=c,c=s.child;c!==null;)fs(c,r),c=c.sibling;return F(rn,rn.current&1|2),kt&&In(s,m.treeForkCount),s.child}r=r.sibling}m.tail!==null&&Ze()>$d&&(s.flags|=128,E=!0,Zc(m,!1),s.lanes=4194304)}else{if(!E)if(r=kd(T),r!==null){if(s.flags|=128,E=!0,r=r.updateQueue,s.updateQueue=r,zd(s,r),Zc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!T.alternate&&!kt)return Wt(s),null}else 2*Ze()-m.renderingStartTime>$d&&c!==536870912&&(s.flags|=128,E=!0,Zc(m,!1),s.lanes=4194304);m.isBackwards?(T.sibling=s.child,s.child=T):(r=m.last,r!==null?r.sibling=T:s.child=T,m.last=T)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=Ze(),r.sibling=null,c=rn.current,F(rn,E?c&1|2:c&1),kt&&In(s,m.treeForkCount),r):(Wt(s),null);case 22:case 23:return Nr(s),up(),m=s.memoizedState!==null,r!==null?r.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(c&536870912)!==0&&(s.flags&128)===0&&(Wt(s),s.subtreeFlags&6&&(s.flags|=8192)):Wt(s),c=s.updateQueue,c!==null&&zd(s,c.retryQueue),c=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==c&&(s.flags|=2048),r!==null&&H(_a),null;case 24:return c=null,r!==null&&(c=r.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),gs(cn),Wt(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function fk(r,s){switch(Yh(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return gs(cn),te(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return ae(s),null;case 31:if(s.memoizedState!==null){if(Nr(s),s.alternate===null)throw Error(i(340));ma()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(Nr(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));ma()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return H(rn),null;case 4:return te(),null;case 10:return gs(s.type),null;case 22:case 23:return Nr(s),up(),r!==null&&H(_a),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return gs(cn),null;case 25:return null;default:return null}}function $_(r,s){switch(Yh(s),s.tag){case 3:gs(cn),te();break;case 26:case 27:case 5:ae(s);break;case 4:te();break;case 31:s.memoizedState!==null&&Nr(s);break;case 13:Nr(s);break;case 19:H(rn);break;case 10:gs(s.type);break;case 22:case 23:Nr(s),up(),r!==null&&H(_a);break;case 24:gs(cn)}}function Jc(r,s){try{var c=s.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var E=m.next;c=E;do{if((c.tag&r)===r){m=void 0;var T=c.create,P=c.inst;m=T(),P.destroy=m}c=c.next}while(c!==E)}}catch(X){Lt(s,s.return,X)}}function ao(r,s,c){try{var m=s.updateQueue,E=m!==null?m.lastEffect:null;if(E!==null){var T=E.next;m=T;do{if((m.tag&r)===r){var P=m.inst,X=P.destroy;if(X!==void 0){P.destroy=void 0,E=s;var re=c,fe=X;try{fe()}catch(ye){Lt(E,re,ye)}}}m=m.next}while(m!==T)}}catch(ye){Lt(s,s.return,ye)}}function q_(r){var s=r.updateQueue;if(s!==null){var c=r.stateNode;try{Ov(s,c)}catch(m){Lt(r,r.return,m)}}}function V_(r,s,c){c.props=wa(r.type,r.memoizedProps),c.state=r.memoizedState;try{c.componentWillUnmount()}catch(m){Lt(r,s,m)}}function eu(r,s){try{var c=r.ref;if(c!==null){switch(r.tag){case 26:case 27:case 5:var m=r.stateNode;break;case 30:m=r.stateNode;break;default:m=r.stateNode}typeof c=="function"?r.refCleanup=c(m):c.current=m}}catch(E){Lt(r,s,E)}}function Ui(r,s){var c=r.ref,m=r.refCleanup;if(c!==null)if(typeof m=="function")try{m()}catch(E){Lt(r,s,E)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(E){Lt(r,s,E)}else c.current=null}function W_(r){var s=r.type,c=r.memoizedProps,m=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&m.focus();break e;case"img":c.src?m.src=c.src:c.srcSet&&(m.srcset=c.srcSet)}}catch(E){Lt(r,r.return,E)}}function Up(r,s,c){try{var m=r.stateNode;Ok(m,r.type,c,s),m[en]=s}catch(E){Lt(r,r.return,E)}}function G_(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&mo(r.type)||r.tag===4}function $p(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||G_(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&mo(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function qp(r,s,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(r,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(r),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=tr));else if(m!==4&&(m===27&&mo(r.type)&&(c=r.stateNode,s=null),r=r.child,r!==null))for(qp(r,s,c),r=r.sibling;r!==null;)qp(r,s,c),r=r.sibling}function Pd(r,s,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,s?c.insertBefore(r,s):c.appendChild(r);else if(m!==4&&(m===27&&mo(r.type)&&(c=r.stateNode),r=r.child,r!==null))for(Pd(r,s,c),r=r.sibling;r!==null;)Pd(r,s,c),r=r.sibling}function K_(r){var s=r.stateNode,c=r.memoizedProps;try{for(var m=r.type,E=s.attributes;E.length;)s.removeAttributeNode(E[0]);Fn(s,m,c),s[Nt]=r,s[en]=c}catch(T){Lt(r,r.return,T)}}var xs=!1,fn=!1,Vp=!1,Y_=typeof WeakSet=="function"?WeakSet:Set,kn=null;function hk(r,s){if(r=r.containerInfo,fm=af,r=vi(r),Ii(r)){if("selectionStart"in r)var c={start:r.selectionStart,end:r.selectionEnd};else e:{c=(c=r.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var E=m.anchorOffset,T=m.focusNode;m=m.focusOffset;try{c.nodeType,T.nodeType}catch{c=null;break e}var P=0,X=-1,re=-1,fe=0,ye=0,we=r,he=null;t:for(;;){for(var me;we!==c||E!==0&&we.nodeType!==3||(X=P+E),we!==T||m!==0&&we.nodeType!==3||(re=P+m),we.nodeType===3&&(P+=we.nodeValue.length),(me=we.firstChild)!==null;)he=we,we=me;for(;;){if(we===r)break t;if(he===c&&++fe===E&&(X=P),he===T&&++ye===m&&(re=P),(me=we.nextSibling)!==null)break;we=he,he=we.parentNode}we=me}c=X===-1||re===-1?null:{start:X,end:re}}else c=null}c=c||{start:0,end:0}}else c=null;for(hm={focusedElem:r,selectionRange:c},af=!1,kn=s;kn!==null;)if(s=kn,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,kn=r;else for(;kn!==null;){switch(s=kn,T=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(c=0;c<r.length;c++)E=r[c],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&T!==null){r=void 0,c=s,E=T.memoizedProps,T=T.memoizedState,m=c.stateNode;try{var Fe=wa(c.type,E);r=m.getSnapshotBeforeUpdate(Fe,T),m.__reactInternalSnapshotBeforeUpdate=r}catch(lt){Lt(c,c.return,lt)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,c=r.nodeType,c===9)gm(r);else if(c===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":gm(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=s.sibling,r!==null){r.return=s.return,kn=r;break}kn=s.return}}function X_(r,s,c){var m=c.flags;switch(c.tag){case 0:case 11:case 15:ws(r,c),m&4&&Jc(5,c);break;case 1:if(ws(r,c),m&4)if(r=c.stateNode,s===null)try{r.componentDidMount()}catch(P){Lt(c,c.return,P)}else{var E=wa(c.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(E,s,r.__reactInternalSnapshotBeforeUpdate)}catch(P){Lt(c,c.return,P)}}m&64&&q_(c),m&512&&eu(c,c.return);break;case 3:if(ws(r,c),m&64&&(r=c.updateQueue,r!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{Ov(r,s)}catch(P){Lt(c,c.return,P)}}break;case 27:s===null&&m&4&&K_(c);case 26:case 5:ws(r,c),s===null&&m&4&&W_(c),m&512&&eu(c,c.return);break;case 12:ws(r,c);break;case 31:ws(r,c),m&4&&J_(r,c);break;case 13:ws(r,c),m&4&&e0(r,c),m&64&&(r=c.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(c=Sk.bind(null,c),Uk(r,c))));break;case 22:if(m=c.memoizedState!==null||xs,!m){s=s!==null&&s.memoizedState!==null||fn,E=xs;var T=fn;xs=m,(fn=s)&&!T?Cs(r,c,(c.subtreeFlags&8772)!==0):ws(r,c),xs=E,fn=T}break;case 30:break;default:ws(r,c)}}function Q_(r){var s=r.alternate;s!==null&&(r.alternate=null,Q_(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&br(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Qt=null,fr=!1;function Ss(r,s,c){for(c=c.child;c!==null;)Z_(r,s,c),c=c.sibling}function Z_(r,s,c){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Ve,c)}catch{}switch(c.tag){case 26:fn||Ui(c,s),Ss(r,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:fn||Ui(c,s);var m=Qt,E=fr;mo(c.type)&&(Qt=c.stateNode,fr=!1),Ss(r,s,c),cu(c.stateNode),Qt=m,fr=E;break;case 5:fn||Ui(c,s);case 6:if(m=Qt,E=fr,Qt=null,Ss(r,s,c),Qt=m,fr=E,Qt!==null)if(fr)try{(Qt.nodeType===9?Qt.body:Qt.nodeName==="HTML"?Qt.ownerDocument.body:Qt).removeChild(c.stateNode)}catch(T){Lt(c,s,T)}else try{Qt.removeChild(c.stateNode)}catch(T){Lt(c,s,T)}break;case 18:Qt!==null&&(fr?(r=Qt,q0(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,c.stateNode),Bl(r)):q0(Qt,c.stateNode));break;case 4:m=Qt,E=fr,Qt=c.stateNode.containerInfo,fr=!0,Ss(r,s,c),Qt=m,fr=E;break;case 0:case 11:case 14:case 15:ao(2,c,s),fn||ao(4,c,s),Ss(r,s,c);break;case 1:fn||(Ui(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"&&V_(c,s,m)),Ss(r,s,c);break;case 21:Ss(r,s,c);break;case 22:fn=(m=fn)||c.memoizedState!==null,Ss(r,s,c),fn=m;break;default:Ss(r,s,c)}}function J_(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Bl(r)}catch(c){Lt(s,s.return,c)}}}function e0(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Bl(r)}catch(c){Lt(s,s.return,c)}}function pk(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new Y_),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new Y_),s;default:throw Error(i(435,r.tag))}}function Fd(r,s){var c=pk(r);s.forEach(function(m){if(!c.has(m)){c.add(m);var E=wk.bind(null,r,m);m.then(E,E)}})}function hr(r,s){var c=s.deletions;if(c!==null)for(var m=0;m<c.length;m++){var E=c[m],T=r,P=s,X=P;e:for(;X!==null;){switch(X.tag){case 27:if(mo(X.type)){Qt=X.stateNode,fr=!1;break e}break;case 5:Qt=X.stateNode,fr=!1;break e;case 3:case 4:Qt=X.stateNode.containerInfo,fr=!0;break e}X=X.return}if(Qt===null)throw Error(i(160));Z_(T,P,E),Qt=null,fr=!1,T=E.alternate,T!==null&&(T.return=null),E.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)t0(s,r),s=s.sibling}var xi=null;function t0(r,s){var c=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:hr(s,r),pr(r),m&4&&(ao(3,r,r.return),Jc(3,r),ao(5,r,r.return));break;case 1:hr(s,r),pr(r),m&512&&(fn||c===null||Ui(c,c.return)),m&64&&xs&&(r=r.updateQueue,r!==null&&(m=r.callbacks,m!==null&&(c=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=c===null?m:c.concat(m))));break;case 26:var E=xi;if(hr(s,r),pr(r),m&512&&(fn||c===null||Ui(c,c.return)),m&4){var T=c!==null?c.memoizedState:null;if(m=r.memoizedState,c===null)if(m===null)if(r.stateNode===null){e:{m=r.type,c=r.memoizedProps,E=E.ownerDocument||E;t:switch(m){case"title":T=E.getElementsByTagName("title")[0],(!T||T[$n]||T[Nt]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=E.createElement(m),E.head.insertBefore(T,E.querySelector("head > title"))),Fn(T,m,c),T[Nt]=r,Mt(T),m=T;break e;case"link":var P=ty("link","href",E).get(m+(c.href||""));if(P){for(var X=0;X<P.length;X++)if(T=P[X],T.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&T.getAttribute("rel")===(c.rel==null?null:c.rel)&&T.getAttribute("title")===(c.title==null?null:c.title)&&T.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){P.splice(X,1);break t}}T=E.createElement(m),Fn(T,m,c),E.head.appendChild(T);break;case"meta":if(P=ty("meta","content",E).get(m+(c.content||""))){for(X=0;X<P.length;X++)if(T=P[X],T.getAttribute("content")===(c.content==null?null:""+c.content)&&T.getAttribute("name")===(c.name==null?null:c.name)&&T.getAttribute("property")===(c.property==null?null:c.property)&&T.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&T.getAttribute("charset")===(c.charSet==null?null:c.charSet)){P.splice(X,1);break t}}T=E.createElement(m),Fn(T,m,c),E.head.appendChild(T);break;default:throw Error(i(468,m))}T[Nt]=r,Mt(T),m=T}r.stateNode=m}else ny(E,r.type,r.stateNode);else r.stateNode=ey(E,m,r.memoizedProps);else T!==m?(T===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):T.count--,m===null?ny(E,r.type,r.stateNode):ey(E,m,r.memoizedProps)):m===null&&r.stateNode!==null&&Up(r,r.memoizedProps,c.memoizedProps)}break;case 27:hr(s,r),pr(r),m&512&&(fn||c===null||Ui(c,c.return)),c!==null&&m&4&&Up(r,r.memoizedProps,c.memoizedProps);break;case 5:if(hr(s,r),pr(r),m&512&&(fn||c===null||Ui(c,c.return)),r.flags&32){E=r.stateNode;try{di(E,"")}catch(Fe){Lt(r,r.return,Fe)}}m&4&&r.stateNode!=null&&(E=r.memoizedProps,Up(r,E,c!==null?c.memoizedProps:E)),m&1024&&(Vp=!0);break;case 6:if(hr(s,r),pr(r),m&4){if(r.stateNode===null)throw Error(i(162));m=r.memoizedProps,c=r.stateNode;try{c.nodeValue=m}catch(Fe){Lt(r,r.return,Fe)}}break;case 3:if(nf=null,E=xi,xi=ef(s.containerInfo),hr(s,r),xi=E,pr(r),m&4&&c!==null&&c.memoizedState.isDehydrated)try{Bl(s.containerInfo)}catch(Fe){Lt(r,r.return,Fe)}Vp&&(Vp=!1,n0(r));break;case 4:m=xi,xi=ef(r.stateNode.containerInfo),hr(s,r),pr(r),xi=m;break;case 12:hr(s,r),pr(r);break;case 31:hr(s,r),pr(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Fd(r,m)));break;case 13:hr(s,r),pr(r),r.child.flags&8192&&r.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Ud=Ze()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Fd(r,m)));break;case 22:E=r.memoizedState!==null;var re=c!==null&&c.memoizedState!==null,fe=xs,ye=fn;if(xs=fe||E,fn=ye||re,hr(s,r),fn=ye,xs=fe,pr(r),m&8192)e:for(s=r.stateNode,s._visibility=E?s._visibility&-2:s._visibility|1,E&&(c===null||re||xs||fn||Ca(r)),c=null,s=r;;){if(s.tag===5||s.tag===26){if(c===null){re=c=s;try{if(T=re.stateNode,E)P=T.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{X=re.stateNode;var we=re.memoizedProps.style,he=we!=null&&we.hasOwnProperty("display")?we.display:null;X.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Fe){Lt(re,re.return,Fe)}}}else if(s.tag===6){if(c===null){re=s;try{re.stateNode.nodeValue=E?"":re.memoizedProps}catch(Fe){Lt(re,re.return,Fe)}}}else if(s.tag===18){if(c===null){re=s;try{var me=re.stateNode;E?V0(me,!0):V0(re.stateNode,!1)}catch(Fe){Lt(re,re.return,Fe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=r.updateQueue,m!==null&&(c=m.retryQueue,c!==null&&(m.retryQueue=null,Fd(r,c))));break;case 19:hr(s,r),pr(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Fd(r,m)));break;case 30:break;case 21:break;default:hr(s,r),pr(r)}}function pr(r){var s=r.flags;if(s&2){try{for(var c,m=r.return;m!==null;){if(G_(m)){c=m;break}m=m.return}if(c==null)throw Error(i(160));switch(c.tag){case 27:var E=c.stateNode,T=$p(r);Pd(r,T,E);break;case 5:var P=c.stateNode;c.flags&32&&(di(P,""),c.flags&=-33);var X=$p(r);Pd(r,X,P);break;case 3:case 4:var re=c.stateNode.containerInfo,fe=$p(r);qp(r,fe,re);break;default:throw Error(i(161))}}catch(ye){Lt(r,r.return,ye)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function n0(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;n0(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function ws(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)X_(r,s.alternate,s),s=s.sibling}function Ca(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:ao(4,s,s.return),Ca(s);break;case 1:Ui(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&V_(s,s.return,c),Ca(s);break;case 27:cu(s.stateNode);case 26:case 5:Ui(s,s.return),Ca(s);break;case 22:s.memoizedState===null&&Ca(s);break;case 30:Ca(s);break;default:Ca(s)}r=r.sibling}}function Cs(r,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,E=r,T=s,P=T.flags;switch(T.tag){case 0:case 11:case 15:Cs(E,T,c),Jc(4,T);break;case 1:if(Cs(E,T,c),m=T,E=m.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(fe){Lt(m,m.return,fe)}if(m=T,E=m.updateQueue,E!==null){var X=m.stateNode;try{var re=E.shared.hiddenCallbacks;if(re!==null)for(E.shared.hiddenCallbacks=null,E=0;E<re.length;E++)jv(re[E],X)}catch(fe){Lt(m,m.return,fe)}}c&&P&64&&q_(T),eu(T,T.return);break;case 27:K_(T);case 26:case 5:Cs(E,T,c),c&&m===null&&P&4&&W_(T),eu(T,T.return);break;case 12:Cs(E,T,c);break;case 31:Cs(E,T,c),c&&P&4&&J_(E,T);break;case 13:Cs(E,T,c),c&&P&4&&e0(E,T);break;case 22:T.memoizedState===null&&Cs(E,T,c),eu(T,T.return);break;case 30:break;default:Cs(E,T,c)}s=s.sibling}}function Wp(r,s){var c=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==c&&(r!=null&&r.refCount++,c!=null&&Fc(c))}function Gp(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Fc(r))}function Si(r,s,c,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)r0(r,s,c,m),s=s.sibling}function r0(r,s,c,m){var E=s.flags;switch(s.tag){case 0:case 11:case 15:Si(r,s,c,m),E&2048&&Jc(9,s);break;case 1:Si(r,s,c,m);break;case 3:Si(r,s,c,m),E&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Fc(r)));break;case 12:if(E&2048){Si(r,s,c,m),r=s.stateNode;try{var T=s.memoizedProps,P=T.id,X=T.onPostCommit;typeof X=="function"&&X(P,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(re){Lt(s,s.return,re)}}else Si(r,s,c,m);break;case 31:Si(r,s,c,m);break;case 13:Si(r,s,c,m);break;case 23:break;case 22:T=s.stateNode,P=s.alternate,s.memoizedState!==null?T._visibility&2?Si(r,s,c,m):tu(r,s):T._visibility&2?Si(r,s,c,m):(T._visibility|=2,El(r,s,c,m,(s.subtreeFlags&10256)!==0||!1)),E&2048&&Wp(P,s);break;case 24:Si(r,s,c,m),E&2048&&Gp(s.alternate,s);break;default:Si(r,s,c,m)}}function El(r,s,c,m,E){for(E=E&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var T=r,P=s,X=c,re=m,fe=P.flags;switch(P.tag){case 0:case 11:case 15:El(T,P,X,re,E),Jc(8,P);break;case 23:break;case 22:var ye=P.stateNode;P.memoizedState!==null?ye._visibility&2?El(T,P,X,re,E):tu(T,P):(ye._visibility|=2,El(T,P,X,re,E)),E&&fe&2048&&Wp(P.alternate,P);break;case 24:El(T,P,X,re,E),E&&fe&2048&&Gp(P.alternate,P);break;default:El(T,P,X,re,E)}s=s.sibling}}function tu(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=r,m=s,E=m.flags;switch(m.tag){case 22:tu(c,m),E&2048&&Wp(m.alternate,m);break;case 24:tu(c,m),E&2048&&Gp(m.alternate,m);break;default:tu(c,m)}s=s.sibling}}var nu=8192;function Al(r,s,c){if(r.subtreeFlags&nu)for(r=r.child;r!==null;)i0(r,s,c),r=r.sibling}function i0(r,s,c){switch(r.tag){case 26:Al(r,s,c),r.flags&nu&&r.memoizedState!==null&&eE(c,xi,r.memoizedState,r.memoizedProps);break;case 5:Al(r,s,c);break;case 3:case 4:var m=xi;xi=ef(r.stateNode.containerInfo),Al(r,s,c),xi=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=nu,nu=16777216,Al(r,s,c),nu=m):Al(r,s,c));break;default:Al(r,s,c)}}function s0(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function ru(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var m=s[c];kn=m,a0(m,r)}s0(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)o0(r),r=r.sibling}function o0(r){switch(r.tag){case 0:case 11:case 15:ru(r),r.flags&2048&&ao(9,r,r.return);break;case 3:ru(r);break;case 12:ru(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,Hd(r)):ru(r);break;default:ru(r)}}function Hd(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var m=s[c];kn=m,a0(m,r)}s0(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:ao(8,s,s.return),Hd(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Hd(s));break;default:Hd(s)}r=r.sibling}}function a0(r,s){for(;kn!==null;){var c=kn;switch(c.tag){case 0:case 11:case 15:ao(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var m=c.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Fc(c.memoizedState.cache)}if(m=c.child,m!==null)m.return=c,kn=m;else e:for(c=r;kn!==null;){m=kn;var E=m.sibling,T=m.return;if(Q_(m),m===c){kn=null;break e}if(E!==null){E.return=T,kn=E;break e}kn=T}}}var mk={getCacheForType:function(r){var s=zn(cn),c=s.data.get(r);return c===void 0&&(c=r(),s.data.set(r,c)),c},cacheSignal:function(){return zn(cn).controller.signal}},gk=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Ht=null,yt=null,wt=0,Ot=0,Dr=null,lo=!1,Rl=!1,Kp=!1,ks=0,nn=0,co=0,ka=0,Yp=0,Mr=0,Tl=0,iu=null,mr=null,Xp=!1,Ud=0,l0=0,$d=1/0,qd=null,uo=null,xn=0,fo=null,Nl=null,Es=0,Qp=0,Zp=null,c0=null,su=0,Jp=null;function jr(){return(Dt&2)!==0&&wt!==0?wt&-wt:G.T!==null?sm():pn()}function u0(){if(Mr===0)if((wt&536870912)===0||kt){var r=Ft;Ft<<=1,(Ft&3932160)===0&&(Ft=262144),Mr=r}else Mr=536870912;return r=Tr.current,r!==null&&(r.flags|=32),Mr}function gr(r,s,c){(r===Ht&&(Ot===2||Ot===9)||r.cancelPendingCommit!==null)&&(Dl(r,0),ho(r,wt,Mr,!1)),Un(r,c),((Dt&2)===0||r!==Ht)&&(r===Ht&&((Dt&2)===0&&(ka|=c),nn===4&&ho(r,wt,Mr,!1)),$i(r))}function d0(r,s,c){if((Dt&6)!==0)throw Error(i(327));var m=!c&&(s&127)===0&&(s&r.expiredLanes)===0||Tn(r,s),E=m?yk(r,s):tm(r,s,!0),T=m;do{if(E===0){Rl&&!m&&ho(r,s,0,!1);break}else{if(c=r.current.alternate,T&&!vk(c)){E=tm(r,s,!1),T=!1;continue}if(E===2){if(T=s,r.errorRecoveryDisabledLanes&T)var P=0;else P=r.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){s=P;e:{var X=r;E=iu;var re=X.current.memoizedState.isDehydrated;if(re&&(Dl(X,P).flags|=256),P=tm(X,P,!1),P!==2){if(Kp&&!re){X.errorRecoveryDisabledLanes|=T,ka|=T,E=4;break e}T=mr,mr=E,T!==null&&(mr===null?mr=T:mr.push.apply(mr,T))}E=P}if(T=!1,E!==2)continue}}if(E===1){Dl(r,0),ho(r,s,0,!0);break}e:{switch(m=r,T=E,T){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:ho(m,s,Mr,!lo);break e;case 2:mr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(E=Ud+300-Ze(),10<E)){if(ho(m,s,Mr,!lo),Rn(m,0,!0)!==0)break e;Es=s,m.timeoutHandle=U0(f0.bind(null,m,c,mr,qd,Xp,s,Mr,ka,Tl,lo,T,"Throttled",-0,0),E);break e}f0(m,c,mr,qd,Xp,s,Mr,ka,Tl,lo,T,null,-0,0)}}break}while(!0);$i(r)}function f0(r,s,c,m,E,T,P,X,re,fe,ye,we,he,me){if(r.timeoutHandle=-1,we=s.subtreeFlags,we&8192||(we&16785408)===16785408){we={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tr},i0(s,T,we);var Fe=(T&62914560)===T?Ud-Ze():(T&4194048)===T?l0-Ze():0;if(Fe=tE(we,Fe),Fe!==null){Es=T,r.cancelPendingCommit=Fe(b0.bind(null,r,s,T,c,m,E,P,X,re,ye,we,null,he,me)),ho(r,T,P,!fe);return}}b0(r,s,T,c,m,E,P,X,re)}function vk(r){for(var s=r;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var m=0;m<c.length;m++){var E=c[m],T=E.getSnapshot;E=E.value;try{if(!ln(T(),E))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ho(r,s,c,m){s&=~Yp,s&=~ka,r.suspendedLanes|=s,r.pingedLanes&=~s,m&&(r.warmLanes|=s),m=r.expirationTimes;for(var E=s;0<E;){var T=31-be(E),P=1<<T;m[T]=-1,E&=~P}c!==0&&ar(r,c,s)}function Vd(){return(Dt&6)===0?(ou(0),!1):!0}function em(){if(yt!==null){if(Ot===0)var r=yt.return;else r=yt,ms=ga=null,gp(r),xl=null,Uc=0,r=yt;for(;r!==null;)$_(r.alternate,r),r=r.return;yt=null}}function Dl(r,s){var c=r.timeoutHandle;c!==-1&&(r.timeoutHandle=-1,Bk(c)),c=r.cancelPendingCommit,c!==null&&(r.cancelPendingCommit=null,c()),Es=0,em(),Ht=r,yt=c=_i(r.current,null),wt=s,Ot=0,Dr=null,lo=!1,Rl=Tn(r,s),Kp=!1,Tl=Mr=Yp=ka=co=nn=0,mr=iu=null,Xp=!1,(s&8)!==0&&(s|=s&32);var m=r.entangledLanes;if(m!==0)for(r=r.entanglements,m&=s;0<m;){var E=31-be(m),T=1<<E;s|=r[E],m&=~T}return ks=s,ke(),c}function h0(r,s){ht=null,G.H=Xc,s===bl||s===bd?(s=Tv(),Ot=3):s===ip?(s=Tv(),Ot=4):Ot=s===Mp?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Dr=s,yt===null&&(nn=1,Od(r,_n(s,r.current)))}function p0(){var r=Tr.current;return r===null?!0:(wt&4194048)===wt?Jr===null:(wt&62914560)===wt||(wt&536870912)!==0?r===Jr:!1}function m0(){var r=G.H;return G.H=Xc,r===null?Xc:r}function g0(){var r=G.A;return G.A=mk,r}function Wd(){nn=4,lo||(wt&4194048)!==wt&&Tr.current!==null||(Rl=!0),(co&134217727)===0&&(ka&134217727)===0||Ht===null||ho(Ht,wt,Mr,!1)}function tm(r,s,c){var m=Dt;Dt|=2;var E=m0(),T=g0();(Ht!==r||wt!==s)&&(qd=null,Dl(r,s)),s=!1;var P=nn;e:do try{if(Ot!==0&&yt!==null){var X=yt,re=Dr;switch(Ot){case 8:em(),P=6;break e;case 3:case 2:case 9:case 6:Tr.current===null&&(s=!0);var fe=Ot;if(Ot=0,Dr=null,Ml(r,X,re,fe),c&&Rl){P=0;break e}break;default:fe=Ot,Ot=0,Dr=null,Ml(r,X,re,fe)}}_k(),P=nn;break}catch(ye){h0(r,ye)}while(!0);return s&&r.shellSuspendCounter++,ms=ga=null,Dt=m,G.H=E,G.A=T,yt===null&&(Ht=null,wt=0,ke()),P}function _k(){for(;yt!==null;)v0(yt)}function yk(r,s){var c=Dt;Dt|=2;var m=m0(),E=g0();Ht!==r||wt!==s?(qd=null,$d=Ze()+500,Dl(r,s)):Rl=Tn(r,s);e:do try{if(Ot!==0&&yt!==null){s=yt;var T=Dr;t:switch(Ot){case 1:Ot=0,Dr=null,Ml(r,s,T,1);break;case 2:case 9:if(Av(T)){Ot=0,Dr=null,_0(s);break}s=function(){Ot!==2&&Ot!==9||Ht!==r||(Ot=7),$i(r)},T.then(s,s);break e;case 3:Ot=7;break e;case 4:Ot=5;break e;case 7:Av(T)?(Ot=0,Dr=null,_0(s)):(Ot=0,Dr=null,Ml(r,s,T,7));break;case 5:var P=null;switch(yt.tag){case 26:P=yt.memoizedState;case 5:case 27:var X=yt;if(P?ry(P):X.stateNode.complete){Ot=0,Dr=null;var re=X.sibling;if(re!==null)yt=re;else{var fe=X.return;fe!==null?(yt=fe,Gd(fe)):yt=null}break t}}Ot=0,Dr=null,Ml(r,s,T,5);break;case 6:Ot=0,Dr=null,Ml(r,s,T,6);break;case 8:em(),nn=6;break e;default:throw Error(i(462))}}bk();break}catch(ye){h0(r,ye)}while(!0);return ms=ga=null,G.H=m,G.A=E,Dt=c,yt!==null?0:(Ht=null,wt=0,ke(),nn)}function bk(){for(;yt!==null&&!ue();)v0(yt)}function v0(r){var s=H_(r.alternate,r,ks);r.memoizedProps=r.pendingProps,s===null?Gd(r):yt=s}function _0(r){var s=r,c=s.alternate;switch(s.tag){case 15:case 0:s=L_(c,s,s.pendingProps,s.type,void 0,wt);break;case 11:s=L_(c,s,s.pendingProps,s.type.render,s.ref,wt);break;case 5:gp(s);default:$_(c,s),s=yt=fs(s,ks),s=H_(c,s,ks)}r.memoizedProps=r.pendingProps,s===null?Gd(r):yt=s}function Ml(r,s,c,m){ms=ga=null,gp(s),xl=null,Uc=0;var E=s.return;try{if(lk(r,E,s,c,wt)){nn=1,Od(r,_n(c,r.current)),yt=null;return}}catch(T){if(E!==null)throw yt=E,T;nn=1,Od(r,_n(c,r.current)),yt=null;return}s.flags&32768?(kt||m===1?r=!0:Rl||(wt&536870912)!==0?r=!1:(lo=r=!0,(m===2||m===9||m===3||m===6)&&(m=Tr.current,m!==null&&m.tag===13&&(m.flags|=16384))),y0(s,r)):Gd(s)}function Gd(r){var s=r;do{if((s.flags&32768)!==0){y0(s,lo);return}r=s.return;var c=dk(s.alternate,s,ks);if(c!==null){yt=c;return}if(s=s.sibling,s!==null){yt=s;return}yt=s=r}while(s!==null);nn===0&&(nn=5)}function y0(r,s){do{var c=fk(r.alternate,r);if(c!==null){c.flags&=32767,yt=c;return}if(c=r.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(r=r.sibling,r!==null)){yt=r;return}yt=r=c}while(r!==null);nn=6,yt=null}function b0(r,s,c,m,E,T,P,X,re){r.cancelPendingCommit=null;do Kd();while(xn!==0);if((Dt&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(T=s.lanes|s.childLanes,T|=ge,oi(r,c,T,P,X,re),r===Ht&&(yt=Ht=null,wt=0),Nl=s,fo=r,Es=c,Qp=T,Zp=E,c0=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Ck(pe,function(){return k0(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=G.T,G.T=null,E=Y.p,Y.p=2,P=Dt,Dt|=4;try{hk(r,s,c)}finally{Dt=P,Y.p=E,G.T=m}}xn=1,x0(),S0(),w0()}}function x0(){if(xn===1){xn=0;var r=fo,s=Nl,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=G.T,G.T=null;var m=Y.p;Y.p=2;var E=Dt;Dt|=4;try{t0(s,r);var T=hm,P=vi(r.containerInfo),X=T.focusedElem,re=T.selectionRange;if(P!==X&&X&&X.ownerDocument&&gi(X.ownerDocument.documentElement,X)){if(re!==null&&Ii(X)){var fe=re.start,ye=re.end;if(ye===void 0&&(ye=fe),"selectionStart"in X)X.selectionStart=fe,X.selectionEnd=Math.min(ye,X.value.length);else{var we=X.ownerDocument||document,he=we&&we.defaultView||window;if(he.getSelection){var me=he.getSelection(),Fe=X.textContent.length,lt=Math.min(re.start,Fe),zt=re.end===void 0?lt:Math.min(re.end,Fe);!me.extend&<>zt&&(P=zt,zt=lt,lt=P);var le=mi(X,lt),oe=mi(X,zt);if(le&&oe&&(me.rangeCount!==1||me.anchorNode!==le.node||me.anchorOffset!==le.offset||me.focusNode!==oe.node||me.focusOffset!==oe.offset)){var de=we.createRange();de.setStart(le.node,le.offset),me.removeAllRanges(),lt>zt?(me.addRange(de),me.extend(oe.node,oe.offset)):(de.setEnd(oe.node,oe.offset),me.addRange(de))}}}}for(we=[],me=X;me=me.parentNode;)me.nodeType===1&&we.push({element:me,left:me.scrollLeft,top:me.scrollTop});for(typeof X.focus=="function"&&X.focus(),X=0;X<we.length;X++){var Se=we[X];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}af=!!fm,hm=fm=null}finally{Dt=E,Y.p=m,G.T=c}}r.current=s,xn=2}}function S0(){if(xn===2){xn=0;var r=fo,s=Nl,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=G.T,G.T=null;var m=Y.p;Y.p=2;var E=Dt;Dt|=4;try{X_(r,s.alternate,s)}finally{Dt=E,Y.p=m,G.T=c}}xn=3}}function w0(){if(xn===4||xn===3){xn=0,it();var r=fo,s=Nl,c=Es,m=c0;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?xn=5:(xn=0,Nl=fo=null,C0(r,r.pendingLanes));var E=r.pendingLanes;if(E===0&&(uo=null),$r(c),s=s.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(Ve,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=G.T,E=Y.p,Y.p=2,G.T=null;try{for(var T=r.onRecoverableError,P=0;P<m.length;P++){var X=m[P];T(X.value,{componentStack:X.stack})}}finally{G.T=s,Y.p=E}}(Es&3)!==0&&Kd(),$i(r),E=r.pendingLanes,(c&261930)!==0&&(E&42)!==0?r===Jp?su++:(su=0,Jp=r):su=0,ou(0)}}function C0(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,Fc(s)))}function Kd(){return x0(),S0(),w0(),k0()}function k0(){if(xn!==5)return!1;var r=fo,s=Qp;Qp=0;var c=$r(Es),m=G.T,E=Y.p;try{Y.p=32>c?32:c,G.T=null,c=Zp,Zp=null;var T=fo,P=Es;if(xn=0,Nl=fo=null,Es=0,(Dt&6)!==0)throw Error(i(331));var X=Dt;if(Dt|=4,o0(T.current),r0(T,T.current,P,c),Dt=X,ou(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(Ve,T)}catch{}return!0}finally{Y.p=E,G.T=m,C0(r,s)}}function E0(r,s,c){s=_n(c,s),s=Dp(r.stateNode,s,2),r=io(r,s,2),r!==null&&(Un(r,2),$i(r))}function Lt(r,s,c){if(r.tag===3)E0(r,r,c);else for(;s!==null;){if(s.tag===3){E0(s,r,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(uo===null||!uo.has(m))){r=_n(c,r),c=A_(2),m=io(s,c,2),m!==null&&(R_(c,m,s,r),Un(m,2),$i(m));break}}s=s.return}}function nm(r,s,c){var m=r.pingCache;if(m===null){m=r.pingCache=new gk;var E=new Set;m.set(s,E)}else E=m.get(s),E===void 0&&(E=new Set,m.set(s,E));E.has(c)||(Kp=!0,E.add(c),r=xk.bind(null,r,s,c),s.then(r,r))}function xk(r,s,c){var m=r.pingCache;m!==null&&m.delete(s),r.pingedLanes|=r.suspendedLanes&c,r.warmLanes&=~c,Ht===r&&(wt&c)===c&&(nn===4||nn===3&&(wt&62914560)===wt&&300>Ze()-Ud?(Dt&2)===0&&Dl(r,0):Yp|=c,Tl===wt&&(Tl=0)),$i(r)}function A0(r,s){s===0&&(s=on()),r=Xt(r,s),r!==null&&(Un(r,s),$i(r))}function Sk(r){var s=r.memoizedState,c=0;s!==null&&(c=s.retryLane),A0(r,c)}function wk(r,s){var c=0;switch(r.tag){case 31:case 13:var m=r.stateNode,E=r.memoizedState;E!==null&&(c=E.retryLane);break;case 19:m=r.stateNode;break;case 22:m=r.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(s),A0(r,c)}function Ck(r,s){return Qe(r,s)}var Yd=null,jl=null,rm=!1,Xd=!1,im=!1,po=0;function $i(r){r!==jl&&r.next===null&&(jl===null?Yd=jl=r:jl=jl.next=r),Xd=!0,rm||(rm=!0,Ek())}function ou(r,s){if(!im&&Xd){im=!0;do for(var c=!1,m=Yd;m!==null;){if(r!==0){var E=m.pendingLanes;if(E===0)var T=0;else{var P=m.suspendedLanes,X=m.pingedLanes;T=(1<<31-be(42|r)+1)-1,T&=E&~(P&~X),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(c=!0,D0(m,T))}else T=wt,T=Rn(m,m===Ht?T:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(T&3)===0||Tn(m,T)||(c=!0,D0(m,T));m=m.next}while(c);im=!1}}function kk(){R0()}function R0(){Xd=rm=!1;var r=0;po!==0&&Ik()&&(r=po);for(var s=Ze(),c=null,m=Yd;m!==null;){var E=m.next,T=T0(m,s);T===0?(m.next=null,c===null?Yd=E:c.next=E,E===null&&(jl=c)):(c=m,(r!==0||(T&3)!==0)&&(Xd=!0)),m=E}xn!==0&&xn!==5||ou(r),po!==0&&(po=0)}function T0(r,s){for(var c=r.suspendedLanes,m=r.pingedLanes,E=r.expirationTimes,T=r.pendingLanes&-62914561;0<T;){var P=31-be(T),X=1<<P,re=E[P];re===-1?((X&c)===0||(X&m)!==0)&&(E[P]=Zt(X,s)):re<=s&&(r.expiredLanes|=X),T&=~X}if(s=Ht,c=wt,c=Rn(r,r===s?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,c===0||r===s&&(Ot===2||Ot===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&ot(m),r.callbackNode=null,r.callbackPriority=0;if((c&3)===0||Tn(r,c)){if(s=c&-c,s===r.callbackPriority)return s;switch(m!==null&&ot(m),$r(c)){case 2:case 8:c=xe;break;case 32:c=pe;break;case 268435456:c=Le;break;default:c=pe}return m=N0.bind(null,r),c=Qe(c,m),r.callbackPriority=s,r.callbackNode=c,s}return m!==null&&m!==null&&ot(m),r.callbackPriority=2,r.callbackNode=null,2}function N0(r,s){if(xn!==0&&xn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var c=r.callbackNode;if(Kd()&&r.callbackNode!==c)return null;var m=wt;return m=Rn(r,r===Ht?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(d0(r,m,s),T0(r,Ze()),r.callbackNode!=null&&r.callbackNode===c?N0.bind(null,r):null)}function D0(r,s){if(Kd())return null;d0(r,s,!0)}function Ek(){zk(function(){(Dt&6)!==0?Qe(ce,kk):R0()})}function sm(){if(po===0){var r=_l;r===0&&(r=Pt,Pt<<=1,(Pt&261888)===0&&(Pt=256)),po=r}return po}function M0(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Ji(""+r)}function j0(r,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,r.id&&c.setAttribute("form",r.id),s.parentNode.insertBefore(c,s),r=new FormData(r),c.parentNode.removeChild(c),r}function Ak(r,s,c,m,E){if(s==="submit"&&c&&c.stateNode===E){var T=M0((E[en]||null).action),P=m.submitter;P&&(s=(s=P[en]||null)?M0(s.formAction):P.getAttribute("formAction"),s!==null&&(T=s,P=null));var X=new rs("action","action",null,m,E);r.push({event:X,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(po!==0){var re=P?j0(E,P):new FormData(E);kp(c,{pending:!0,data:re,method:E.method,action:T},null,re)}}else typeof T=="function"&&(X.preventDefault(),re=P?j0(E,P):new FormData(E),kp(c,{pending:!0,data:re,method:E.method,action:T},T,re))},currentTarget:E}]})}}for(var om=0;om<ml.length;om++){var am=ml[om],Rk=am.toLowerCase(),Tk=am[0].toUpperCase()+am.slice(1);ee(Rk,"on"+Tk)}ee(Dc,"onAnimationEnd"),ee(Mc,"onAnimationIteration"),ee(jc,"onAnimationStart"),ee("dblclick","onDoubleClick"),ee("focusin","onFocus"),ee("focusout","onBlur"),ee(pd,"onTransitionRun"),ee(md,"onTransitionStart"),ee(gd,"onTransitionCancel"),ee(Oc,"onTransitionEnd"),Zn("onMouseEnter",["mouseout","mouseover"]),Zn("onMouseLeave",["mouseout","mouseover"]),Zn("onPointerEnter",["pointerout","pointerover"]),Zn("onPointerLeave",["pointerout","pointerover"]),jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jn("onBeforeInput",["compositionend","keypress","textInput","paste"]),jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var au="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Nk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(au));function O0(r,s){s=(s&4)!==0;for(var c=0;c<r.length;c++){var m=r[c],E=m.event;m=m.listeners;e:{var T=void 0;if(s)for(var P=m.length-1;0<=P;P--){var X=m[P],re=X.instance,fe=X.currentTarget;if(X=X.listener,re!==T&&E.isPropagationStopped())break e;T=X,E.currentTarget=fe;try{T(E)}catch(ye){Re(ye)}E.currentTarget=null,T=re}else for(P=0;P<m.length;P++){if(X=m[P],re=X.instance,fe=X.currentTarget,X=X.listener,re!==T&&E.isPropagationStopped())break e;T=X,E.currentTarget=fe;try{T(E)}catch(ye){Re(ye)}E.currentTarget=null,T=re}}}}function bt(r,s){var c=s[Dn];c===void 0&&(c=s[Dn]=new Set);var m=r+"__bubble";c.has(m)||(L0(s,r,2,!1),c.add(m))}function lm(r,s,c){var m=0;s&&(m|=4),L0(c,r,m,s)}var Qd="_reactListening"+Math.random().toString(36).slice(2);function cm(r){if(!r[Qd]){r[Qd]=!0,xr.forEach(function(c){c!=="selectionchange"&&(Nk.has(c)||lm(c,!1,r),lm(c,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Qd]||(s[Qd]=!0,lm("selectionchange",!1,s))}}function L0(r,s,c,m){switch(uy(s)){case 2:var E=iE;break;case 8:E=sE;break;default:E=Cm}c=E.bind(null,s,c,r),E=void 0,!Us||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),m?E!==void 0?r.addEventListener(s,c,{capture:!0,passive:E}):r.addEventListener(s,c,!0):E!==void 0?r.addEventListener(s,c,{passive:E}):r.addEventListener(s,c,!1)}function um(r,s,c,m,E){var T=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var P=m.tag;if(P===3||P===4){var X=m.stateNode.containerInfo;if(X===E)break;if(P===4)for(P=m.return;P!==null;){var re=P.tag;if((re===3||re===4)&&P.stateNode.containerInfo===E)return;P=P.return}for(;X!==null;){if(P=Mn(X),P===null)return;if(re=P.tag,re===5||re===6||re===26||re===27){m=T=P;continue e}X=X.parentNode}}m=m.return}Qo(function(){var fe=T,ye=Hs(c),we=[];e:{var he=Lc.get(r);if(he!==void 0){var me=rs,Fe=r;switch(r){case"keypress":if(ts(c)===0)break e;case"keydown":case"keyup":me=tl;break;case"focusin":Fe="focus",me=ss;break;case"focusout":Fe="blur",me=ss;break;case"beforeblur":case"afterblur":me=ss;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=Ws;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=ea;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=nl;break;case Dc:case Mc:case jc:me=Ya;break;case Oc:me=rl;break;case"scroll":case"scrollend":me=Va;break;case"wheel":me=il;break;case"copy":case"cut":case"paste":me=Qa;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=ra;break;case"toggle":case"beforetoggle":me=sl}var lt=(s&4)!==0,zt=!lt&&(r==="scroll"||r==="scrollend"),le=lt?he!==null?he+"Capture":null:he;lt=[];for(var oe=fe,de;oe!==null;){var Se=oe;if(de=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||de===null||le===null||(Se=Mi(oe,le),Se!=null&<.push(lu(oe,Se,de))),zt)break;oe=oe.return}0<lt.length&&(he=new me(he,Fe,null,c,ye),we.push({event:he,listeners:lt}))}}if((s&7)===0){e:{if(he=r==="mouseover"||r==="pointerover",me=r==="mouseout"||r==="pointerout",he&&c!==Fs&&(Fe=c.relatedTarget||c.fromElement)&&(Mn(Fe)||Fe[Nn]))break e;if((me||he)&&(he=ye.window===ye?ye:(he=ye.ownerDocument)?he.defaultView||he.parentWindow:window,me?(Fe=c.relatedTarget||c.toElement,me=fe,Fe=Fe?Mn(Fe):null,Fe!==null&&(zt=l(Fe),lt=Fe.tag,Fe!==zt||lt!==5&<!==27&<!==6)&&(Fe=null)):(me=null,Fe=fe),me!==Fe)){if(lt=Ws,Se="onMouseLeave",le="onMouseEnter",oe="mouse",(r==="pointerout"||r==="pointerover")&&(lt=ra,Se="onPointerLeave",le="onPointerEnter",oe="pointer"),zt=me==null?he:lr(me),de=Fe==null?he:lr(Fe),he=new lt(Se,oe+"leave",me,c,ye),he.target=zt,he.relatedTarget=de,Se=null,Mn(ye)===fe&&(lt=new lt(le,oe+"enter",Fe,c,ye),lt.target=de,lt.relatedTarget=zt,Se=lt),zt=Se,me&&Fe)t:{for(lt=Dk,le=me,oe=Fe,de=0,Se=le;Se;Se=lt(Se))de++;Se=0;for(var tt=oe;tt;tt=lt(tt))Se++;for(;0<de-Se;)le=lt(le),de--;for(;0<Se-de;)oe=lt(oe),Se--;for(;de--;){if(le===oe||oe!==null&&le===oe.alternate){lt=le;break t}le=lt(le),oe=lt(oe)}lt=null}else lt=null;me!==null&&I0(we,he,me,lt,!1),Fe!==null&&zt!==null&&I0(we,zt,Fe,lt,!0)}}e:{if(he=fe?lr(fe):window,me=he.nodeName&&he.nodeName.toLowerCase(),me==="select"||me==="input"&&he.type==="file")var At=ca;else if(la(he))if(cs)At=pl;else{At=hl;var We=Tc}else me=he.nodeName,!me||me.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?fe&&an(fe.elementType)&&(At=ca):At=ha;if(At&&(At=At(r,fe))){ul(we,At,c,ye);break e}We&&We(r,he,fe),r==="focusout"&&fe&&he.type==="number"&&fe.memoizedProps.value!=null&&Ps(he,"number",he.value)}switch(We=fe?lr(fe):window,r){case"focusin":(la(We)||We.contentEditable==="true")&&(nr=We,Kr=fe,Yr=null);break;case"focusout":Yr=Kr=nr=null;break;case"mousedown":Bi=!0;break;case"contextmenu":case"mouseup":case"dragend":Bi=!1,ds(we,c,ye);break;case"selectionchange":if(Qs)break;case"keydown":case"keyup":ds(we,c,ye)}var pt;if(Ks)e:{switch(r){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else pi?aa(r,c)&&(Ct="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(Ct="onCompositionStart");Ct&&(al&&c.locale!=="ko"&&(pi||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&pi&&(pt=Zo()):(kr=ye,$s="value"in kr?kr.value:kr.textContent,pi=!0)),We=Zd(fe,Ct),0<We.length&&(Ct=new ta(Ct,r,null,c,ye),we.push({event:Ct,listeners:We}),pt?Ct.data=pt:(pt=as(c),pt!==null&&(Ct.data=pt)))),(pt=ol?Ac(r,c):cl(r,c))&&(Ct=Zd(fe,"onBeforeInput"),0<Ct.length&&(We=new ta("onBeforeInput","beforeinput",null,c,ye),we.push({event:We,listeners:Ct}),We.data=pt)),Ak(we,r,fe,c,ye)}O0(we,s)})}function lu(r,s,c){return{instance:r,listener:s,currentTarget:c}}function Zd(r,s){for(var c=s+"Capture",m=[];r!==null;){var E=r,T=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||T===null||(E=Mi(r,c),E!=null&&m.unshift(lu(r,E,T)),E=Mi(r,s),E!=null&&m.push(lu(r,E,T))),r.tag===3)return m;r=r.return}return[]}function Dk(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function I0(r,s,c,m,E){for(var T=s._reactName,P=[];c!==null&&c!==m;){var X=c,re=X.alternate,fe=X.stateNode;if(X=X.tag,re!==null&&re===m)break;X!==5&&X!==26&&X!==27||fe===null||(re=fe,E?(fe=Mi(c,T),fe!=null&&P.unshift(lu(c,fe,re))):E||(fe=Mi(c,T),fe!=null&&P.push(lu(c,fe,re)))),c=c.return}P.length!==0&&r.push({event:s,listeners:P})}var Mk=/\r\n?/g,jk=/\u0000|\uFFFD/g;function B0(r){return(typeof r=="string"?r:""+r).replace(Mk,`
|
|
49
|
+
`).replace(jk,"")}function z0(r,s){return s=B0(s),B0(r)===s}function Bt(r,s,c,m,E,T){switch(c){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||di(r,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&di(r,""+m);break;case"className":er(r,"class",m);break;case"tabIndex":er(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":er(r,c,m);break;case"style":Ko(r,m,T);break;case"data":if(s!=="object"){er(r,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||c!=="href")){r.removeAttribute(c);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=Ji(""+m),r.setAttribute(c,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof T=="function"&&(c==="formAction"?(s!=="input"&&Bt(r,s,"name",E.name,E,null),Bt(r,s,"formEncType",E.formEncType,E,null),Bt(r,s,"formMethod",E.formMethod,E,null),Bt(r,s,"formTarget",E.formTarget,E,null)):(Bt(r,s,"encType",E.encType,E,null),Bt(r,s,"method",E.method,E,null),Bt(r,s,"target",E.target,E,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=Ji(""+m),r.setAttribute(c,m);break;case"onClick":m!=null&&(r.onclick=tr);break;case"onScroll":m!=null&&bt("scroll",r);break;case"onScrollEnd":m!=null&&bt("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(E.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}c=Ji(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""+m):r.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""):r.removeAttribute(c);break;case"capture":case"download":m===!0?r.setAttribute(c,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,m):r.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(c,m):r.removeAttribute(c);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(c):r.setAttribute(c,m);break;case"popover":bt("beforetoggle",r),bt("toggle",r),Cr(r,"popover",m);break;case"xlinkActuate":cr(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":cr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":cr(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":cr(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":cr(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":cr(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":cr(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":cr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":cr(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Cr(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=qa.get(c)||c,Cr(r,c,m))}}function dm(r,s,c,m,E,T){switch(c){case"style":Ko(r,m,T);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(E.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"children":typeof m=="string"?di(r,m):(typeof m=="number"||typeof m=="bigint")&&di(r,""+m);break;case"onScroll":m!=null&&bt("scroll",r);break;case"onScrollEnd":m!=null&&bt("scrollend",r);break;case"onClick":m!=null&&(r.onclick=tr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Di.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(E=c.endsWith("Capture"),s=c.slice(2,E?c.length-7:void 0),T=r[en]||null,T=T!=null?T[c]:null,typeof T=="function"&&r.removeEventListener(s,T,E),typeof m=="function")){typeof T!="function"&&T!==null&&(c in r?r[c]=null:r.hasAttribute(c)&&r.removeAttribute(c)),r.addEventListener(s,m,E);break e}c in r?r[c]=m:m===!0?r.setAttribute(c,""):Cr(r,c,m)}}}function Fn(r,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":bt("error",r),bt("load",r);var m=!1,E=!1,T;for(T in c)if(c.hasOwnProperty(T)){var P=c[T];if(P!=null)switch(T){case"src":m=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Bt(r,s,T,P,c,null)}}E&&Bt(r,s,"srcSet",c.srcSet,c,null),m&&Bt(r,s,"src",c.src,c,null);return;case"input":bt("invalid",r);var X=T=P=E=null,re=null,fe=null;for(m in c)if(c.hasOwnProperty(m)){var ye=c[m];if(ye!=null)switch(m){case"name":E=ye;break;case"type":P=ye;break;case"checked":re=ye;break;case"defaultChecked":fe=ye;break;case"value":T=ye;break;case"defaultValue":X=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(i(137,s));break;default:Bt(r,s,m,ye,c,null)}}qo(r,T,X,re,fe,P,E,!1);return;case"select":bt("invalid",r),m=P=T=null;for(E in c)if(c.hasOwnProperty(E)&&(X=c[E],X!=null))switch(E){case"value":T=X;break;case"defaultValue":P=X;break;case"multiple":m=X;default:Bt(r,s,E,X,c,null)}s=T,c=P,r.multiple=!!m,s!=null?ui(r,!!m,s,!1):c!=null&&ui(r,!!m,c,!0);return;case"textarea":bt("invalid",r),T=E=m=null;for(P in c)if(c.hasOwnProperty(P)&&(X=c[P],X!=null))switch(P){case"value":m=X;break;case"defaultValue":E=X;break;case"children":T=X;break;case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(91));break;default:Bt(r,s,P,X,c,null)}Wo(r,m,E,T);return;case"option":for(re in c)if(c.hasOwnProperty(re)&&(m=c[re],m!=null))switch(re){case"selected":r.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Bt(r,s,re,m,c,null)}return;case"dialog":bt("beforetoggle",r),bt("toggle",r),bt("cancel",r),bt("close",r);break;case"iframe":case"object":bt("load",r);break;case"video":case"audio":for(m=0;m<au.length;m++)bt(au[m],r);break;case"image":bt("error",r),bt("load",r);break;case"details":bt("toggle",r);break;case"embed":case"source":case"link":bt("error",r),bt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in c)if(c.hasOwnProperty(fe)&&(m=c[fe],m!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:Bt(r,s,fe,m,c,null)}return;default:if(an(s)){for(ye in c)c.hasOwnProperty(ye)&&(m=c[ye],m!==void 0&&dm(r,s,ye,m,c,void 0));return}}for(X in c)c.hasOwnProperty(X)&&(m=c[X],m!=null&&Bt(r,s,X,m,c,null))}function Ok(r,s,c,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,T=null,P=null,X=null,re=null,fe=null,ye=null;for(me in c){var we=c[me];if(c.hasOwnProperty(me)&&we!=null)switch(me){case"checked":break;case"value":break;case"defaultValue":re=we;default:m.hasOwnProperty(me)||Bt(r,s,me,null,m,we)}}for(var he in m){var me=m[he];if(we=c[he],m.hasOwnProperty(he)&&(me!=null||we!=null))switch(he){case"type":T=me;break;case"name":E=me;break;case"checked":fe=me;break;case"defaultChecked":ye=me;break;case"value":P=me;break;case"defaultValue":X=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(i(137,s));break;default:me!==we&&Bt(r,s,he,me,m,we)}}Ye(r,P,X,re,fe,ye,T,E);return;case"select":me=P=X=he=null;for(T in c)if(re=c[T],c.hasOwnProperty(T)&&re!=null)switch(T){case"value":break;case"multiple":me=re;default:m.hasOwnProperty(T)||Bt(r,s,T,null,m,re)}for(E in m)if(T=m[E],re=c[E],m.hasOwnProperty(E)&&(T!=null||re!=null))switch(E){case"value":he=T;break;case"defaultValue":X=T;break;case"multiple":P=T;default:T!==re&&Bt(r,s,E,T,m,re)}s=X,c=P,m=me,he!=null?ui(r,!!c,he,!1):!!m!=!!c&&(s!=null?ui(r,!!c,s,!0):ui(r,!!c,c?[]:"",!1));return;case"textarea":me=he=null;for(X in c)if(E=c[X],c.hasOwnProperty(X)&&E!=null&&!m.hasOwnProperty(X))switch(X){case"value":break;case"children":break;default:Bt(r,s,X,null,m,E)}for(P in m)if(E=m[P],T=c[P],m.hasOwnProperty(P)&&(E!=null||T!=null))switch(P){case"value":he=E;break;case"defaultValue":me=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:E!==T&&Bt(r,s,P,E,m,T)}Vo(r,he,me);return;case"option":for(var Fe in c)if(he=c[Fe],c.hasOwnProperty(Fe)&&he!=null&&!m.hasOwnProperty(Fe))switch(Fe){case"selected":r.selected=!1;break;default:Bt(r,s,Fe,null,m,he)}for(re in m)if(he=m[re],me=c[re],m.hasOwnProperty(re)&&he!==me&&(he!=null||me!=null))switch(re){case"selected":r.selected=he&&typeof he!="function"&&typeof he!="symbol";break;default:Bt(r,s,re,he,m,me)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var lt in c)he=c[lt],c.hasOwnProperty(lt)&&he!=null&&!m.hasOwnProperty(lt)&&Bt(r,s,lt,null,m,he);for(fe in m)if(he=m[fe],me=c[fe],m.hasOwnProperty(fe)&&he!==me&&(he!=null||me!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,s));break;default:Bt(r,s,fe,he,m,me)}return;default:if(an(s)){for(var zt in c)he=c[zt],c.hasOwnProperty(zt)&&he!==void 0&&!m.hasOwnProperty(zt)&&dm(r,s,zt,void 0,m,he);for(ye in m)he=m[ye],me=c[ye],!m.hasOwnProperty(ye)||he===me||he===void 0&&me===void 0||dm(r,s,ye,he,m,me);return}}for(var le in c)he=c[le],c.hasOwnProperty(le)&&he!=null&&!m.hasOwnProperty(le)&&Bt(r,s,le,null,m,he);for(we in m)he=m[we],me=c[we],!m.hasOwnProperty(we)||he===me||he==null&&me==null||Bt(r,s,we,he,m,me)}function P0(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Lk(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,c=performance.getEntriesByType("resource"),m=0;m<c.length;m++){var E=c[m],T=E.transferSize,P=E.initiatorType,X=E.duration;if(T&&X&&P0(P)){for(P=0,X=E.responseEnd,m+=1;m<c.length;m++){var re=c[m],fe=re.startTime;if(fe>X)break;var ye=re.transferSize,we=re.initiatorType;ye&&P0(we)&&(re=re.responseEnd,P+=ye*(re<X?1:(X-fe)/(re-fe)))}if(--m,s+=8*(T+P)/(E.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var fm=null,hm=null;function Jd(r){return r.nodeType===9?r:r.ownerDocument}function F0(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H0(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function pm(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var mm=null;function Ik(){var r=window.event;return r&&r.type==="popstate"?r===mm?!1:(mm=r,!0):(mm=null,!1)}var U0=typeof setTimeout=="function"?setTimeout:void 0,Bk=typeof clearTimeout=="function"?clearTimeout:void 0,$0=typeof Promise=="function"?Promise:void 0,zk=typeof queueMicrotask=="function"?queueMicrotask:typeof $0<"u"?function(r){return $0.resolve(null).then(r).catch(Pk)}:U0;function Pk(r){setTimeout(function(){throw r})}function mo(r){return r==="head"}function q0(r,s){var c=s,m=0;do{var E=c.nextSibling;if(r.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"||c==="/&"){if(m===0){r.removeChild(E),Bl(s);return}m--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")m++;else if(c==="html")cu(r.ownerDocument.documentElement);else if(c==="head"){c=r.ownerDocument.head,cu(c);for(var T=c.firstChild;T;){var P=T.nextSibling,X=T.nodeName;T[$n]||X==="SCRIPT"||X==="STYLE"||X==="LINK"&&T.rel.toLowerCase()==="stylesheet"||c.removeChild(T),T=P}}else c==="body"&&cu(r.ownerDocument.body);c=E}while(c);Bl(s)}function V0(r,s){var c=r;r=0;do{var m=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(r===0)break;r--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||r++;c=m}while(c)}function gm(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":gm(c),br(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function Fk(r,s,c,m){for(;r.nodeType===1;){var E=c;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[$n])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(T=r.getAttribute("rel"),T==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(T!==E.rel||r.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||r.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||r.getAttribute("title")!==(E.title==null?null:E.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(T=r.getAttribute("src"),(T!==(E.src==null?null:E.src)||r.getAttribute("type")!==(E.type==null?null:E.type)||r.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&T&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var T=E.name==null?null:""+E.name;if(E.type==="hidden"&&r.getAttribute("name")===T)return r}else return r;if(r=ei(r.nextSibling),r===null)break}return null}function Hk(r,s,c){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!c||(r=ei(r.nextSibling),r===null))return null;return r}function W0(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=ei(r.nextSibling),r===null))return null;return r}function vm(r){return r.data==="$?"||r.data==="$~"}function _m(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function Uk(r,s){var c=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||c.readyState!=="loading")s();else{var m=function(){s(),c.removeEventListener("DOMContentLoaded",m)};c.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function ei(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var ym=null;function G0(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(s===0)return ei(r.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}r=r.nextSibling}return null}function K0(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return r;s--}else c!=="/$"&&c!=="/&"||s++}r=r.previousSibling}return null}function Y0(r,s,c){switch(s=Jd(c),r){case"html":if(r=s.documentElement,!r)throw Error(i(452));return r;case"head":if(r=s.head,!r)throw Error(i(453));return r;case"body":if(r=s.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function cu(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);br(r)}var ti=new Map,X0=new Set;function ef(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var As=Y.d;Y.d={f:$k,r:qk,D:Vk,C:Wk,L:Gk,m:Kk,X:Xk,S:Yk,M:Qk};function $k(){var r=As.f(),s=Vd();return r||s}function qk(r){var s=Qn(r);s!==null&&s.tag===5&&s.type==="form"?h_(s):As.r(r)}var Ol=typeof document>"u"?null:document;function Q0(r,s,c){var m=Ol;if(m&&typeof s=="string"&&s){var E=Pe(s);E='link[rel="'+r+'"][href="'+E+'"]',typeof c=="string"&&(E+='[crossorigin="'+c+'"]'),X0.has(E)||(X0.add(E),r={rel:r,crossOrigin:c,href:s},m.querySelector(E)===null&&(s=m.createElement("link"),Fn(s,"link",r),Mt(s),m.head.appendChild(s)))}}function Vk(r){As.D(r),Q0("dns-prefetch",r,null)}function Wk(r,s){As.C(r,s),Q0("preconnect",r,s)}function Gk(r,s,c){As.L(r,s,c);var m=Ol;if(m&&r&&s){var E='link[rel="preload"][as="'+Pe(s)+'"]';s==="image"&&c&&c.imageSrcSet?(E+='[imagesrcset="'+Pe(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(E+='[imagesizes="'+Pe(c.imageSizes)+'"]')):E+='[href="'+Pe(r)+'"]';var T=E;switch(s){case"style":T=Ll(r);break;case"script":T=Il(r)}ti.has(T)||(r=h({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:r,as:s},c),ti.set(T,r),m.querySelector(E)!==null||s==="style"&&m.querySelector(uu(T))||s==="script"&&m.querySelector(du(T))||(s=m.createElement("link"),Fn(s,"link",r),Mt(s),m.head.appendChild(s)))}}function Kk(r,s){As.m(r,s);var c=Ol;if(c&&r){var m=s&&typeof s.as=="string"?s.as:"script",E='link[rel="modulepreload"][as="'+Pe(m)+'"][href="'+Pe(r)+'"]',T=E;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=Il(r)}if(!ti.has(T)&&(r=h({rel:"modulepreload",href:r},s),ti.set(T,r),c.querySelector(E)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(du(T)))return}m=c.createElement("link"),Fn(m,"link",r),Mt(m),c.head.appendChild(m)}}}function Yk(r,s,c){As.S(r,s,c);var m=Ol;if(m&&r){var E=qn(m).hoistableStyles,T=Ll(r);s=s||"default";var P=E.get(T);if(!P){var X={loading:0,preload:null};if(P=m.querySelector(uu(T)))X.loading=5;else{r=h({rel:"stylesheet",href:r,"data-precedence":s},c),(c=ti.get(T))&&bm(r,c);var re=P=m.createElement("link");Mt(re),Fn(re,"link",r),re._p=new Promise(function(fe,ye){re.onload=fe,re.onerror=ye}),re.addEventListener("load",function(){X.loading|=1}),re.addEventListener("error",function(){X.loading|=2}),X.loading|=4,tf(P,s,m)}P={type:"stylesheet",instance:P,count:1,state:X},E.set(T,P)}}}function Xk(r,s){As.X(r,s);var c=Ol;if(c&&r){var m=qn(c).hoistableScripts,E=Il(r),T=m.get(E);T||(T=c.querySelector(du(E)),T||(r=h({src:r,async:!0},s),(s=ti.get(E))&&xm(r,s),T=c.createElement("script"),Mt(T),Fn(T,"link",r),c.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(E,T))}}function Qk(r,s){As.M(r,s);var c=Ol;if(c&&r){var m=qn(c).hoistableScripts,E=Il(r),T=m.get(E);T||(T=c.querySelector(du(E)),T||(r=h({src:r,async:!0,type:"module"},s),(s=ti.get(E))&&xm(r,s),T=c.createElement("script"),Mt(T),Fn(T,"link",r),c.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(E,T))}}function Z0(r,s,c,m){var E=(E=Z.current)?ef(E):null;if(!E)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=Ll(c.href),c=qn(E).hoistableStyles,m=c.get(s),m||(m={type:"style",instance:null,count:0,state:null},c.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){r=Ll(c.href);var T=qn(E).hoistableStyles,P=T.get(r);if(P||(E=E.ownerDocument||E,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(r,P),(T=E.querySelector(uu(r)))&&!T._p&&(P.instance=T,P.state.loading=5),ti.has(r)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},ti.set(r,c),T||Zk(E,r,c,P.state))),s&&m===null)throw Error(i(528,""));return P}if(s&&m!==null)throw Error(i(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Il(c),c=qn(E).hoistableScripts,m=c.get(s),m||(m={type:"script",instance:null,count:0,state:null},c.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Ll(r){return'href="'+Pe(r)+'"'}function uu(r){return'link[rel="stylesheet"]['+r+"]"}function J0(r){return h({},r,{"data-precedence":r.precedence,precedence:null})}function Zk(r,s,c,m){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=r.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),Fn(s,"link",c),Mt(s),r.head.appendChild(s))}function Il(r){return'[src="'+Pe(r)+'"]'}function du(r){return"script[async]"+r}function ey(r,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var m=r.querySelector('style[data-href~="'+Pe(c.href)+'"]');if(m)return s.instance=m,Mt(m),m;var E=h({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Mt(m),Fn(m,"style",E),tf(m,c.precedence,r),s.instance=m;case"stylesheet":E=Ll(c.href);var T=r.querySelector(uu(E));if(T)return s.state.loading|=4,s.instance=T,Mt(T),T;m=J0(c),(E=ti.get(E))&&bm(m,E),T=(r.ownerDocument||r).createElement("link"),Mt(T);var P=T;return P._p=new Promise(function(X,re){P.onload=X,P.onerror=re}),Fn(T,"link",m),s.state.loading|=4,tf(T,c.precedence,r),s.instance=T;case"script":return T=Il(c.src),(E=r.querySelector(du(T)))?(s.instance=E,Mt(E),E):(m=c,(E=ti.get(T))&&(m=h({},c),xm(m,E)),r=r.ownerDocument||r,E=r.createElement("script"),Mt(E),Fn(E,"link",m),r.head.appendChild(E),s.instance=E);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,tf(m,c.precedence,r));return s.instance}function tf(r,s,c){for(var m=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=m.length?m[m.length-1]:null,T=E,P=0;P<m.length;P++){var X=m[P];if(X.dataset.precedence===s)T=X;else if(T!==E)break}T?T.parentNode.insertBefore(r,T.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(r,s.firstChild))}function bm(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function xm(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var nf=null;function ty(r,s,c){if(nf===null){var m=new Map,E=nf=new Map;E.set(c,m)}else E=nf,m=E.get(c),m||(m=new Map,E.set(c,m));if(m.has(r))return m;for(m.set(r,null),c=c.getElementsByTagName(r),E=0;E<c.length;E++){var T=c[E];if(!(T[$n]||T[Nt]||r==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var P=T.getAttribute(s)||"";P=r+P;var X=m.get(P);X?X.push(T):m.set(P,[T])}}return m}function ny(r,s,c){r=r.ownerDocument||r,r.head.insertBefore(c,s==="title"?r.querySelector("head > title"):null)}function Jk(r,s,c){if(c===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return r=s.disabled,typeof s.precedence=="string"&&r==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function ry(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function eE(r,s,c,m){if(c.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var E=Ll(m.href),T=s.querySelector(uu(E));if(T){s=T._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=rf.bind(r),s.then(r,r)),c.state.loading|=4,c.instance=T,Mt(T);return}T=s.ownerDocument||s,m=J0(m),(E=ti.get(E))&&bm(m,E),T=T.createElement("link"),Mt(T);var P=T;P._p=new Promise(function(X,re){P.onload=X,P.onerror=re}),Fn(T,"link",m),c.instance=T}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(r.count++,c=rf.bind(r),s.addEventListener("load",c),s.addEventListener("error",c))}}var Sm=0;function tE(r,s){return r.stylesheets&&r.count===0&&of(r,r.stylesheets),0<r.count||0<r.imgCount?function(c){var m=setTimeout(function(){if(r.stylesheets&&of(r,r.stylesheets),r.unsuspend){var T=r.unsuspend;r.unsuspend=null,T()}},6e4+s);0<r.imgBytes&&Sm===0&&(Sm=62500*Lk());var E=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&of(r,r.stylesheets),r.unsuspend)){var T=r.unsuspend;r.unsuspend=null,T()}},(r.imgBytes>Sm?50:800)+s);return r.unsuspend=c,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(E)}}:null}function rf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)of(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var sf=null;function of(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,sf=new Map,s.forEach(nE,r),sf=null,rf.call(r))}function nE(r,s){if(!(s.state.loading&4)){var c=sf.get(r);if(c)var m=c.get(null);else{c=new Map,sf.set(r,c);for(var E=r.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<E.length;T++){var P=E[T];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(c.set(P.dataset.precedence,P),m=P)}m&&c.set(null,m)}E=s.instance,P=E.getAttribute("data-precedence"),T=c.get(P)||m,T===m&&c.set(null,E),c.set(P,E),this.count++,m=rf.bind(this),E.addEventListener("load",m),E.addEventListener("error",m),T?T.parentNode.insertBefore(E,T.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(E,r.firstChild)),s.state.loading|=4}}var fu={$$typeof:x,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function rE(r,s,c,m,E,T,P,X,re){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Kt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kt(0),this.hiddenUpdates=Kt(null),this.identifierPrefix=m,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function iy(r,s,c,m,E,T,P,X,re,fe,ye,we){return r=new rE(r,s,c,P,re,fe,ye,we,X),s=1,T===!0&&(s|=24),T=vn(3,null,null,s),r.current=T,T.stateNode=r,s=tp(),s.refCount++,r.pooledCache=s,s.refCount++,T.memoizedState={element:m,isDehydrated:c,cache:s},sp(T),r}function sy(r){return r?(r=Wn,r):Wn}function oy(r,s,c,m,E,T){E=sy(E),m.context===null?m.context=E:m.pendingContext=E,m=ro(s),m.payload={element:c},T=T===void 0?null:T,T!==null&&(m.callback=T),c=io(r,m,s),c!==null&&(gr(c,r,s),qc(c,r,s))}function ay(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<s?c:s}}function wm(r,s){ay(r,s),(r=r.alternate)&&ay(r,s)}function ly(r){if(r.tag===13||r.tag===31){var s=Xt(r,67108864);s!==null&&gr(s,r,67108864),wm(r,67108864)}}function cy(r){if(r.tag===13||r.tag===31){var s=jr();s=li(s);var c=Xt(r,s);c!==null&&gr(c,r,s),wm(r,s)}}var af=!0;function iE(r,s,c,m){var E=G.T;G.T=null;var T=Y.p;try{Y.p=2,Cm(r,s,c,m)}finally{Y.p=T,G.T=E}}function sE(r,s,c,m){var E=G.T;G.T=null;var T=Y.p;try{Y.p=8,Cm(r,s,c,m)}finally{Y.p=T,G.T=E}}function Cm(r,s,c,m){if(af){var E=km(m);if(E===null)um(r,s,m,lf,c),dy(r,m);else if(aE(E,r,s,c,m))m.stopPropagation();else if(dy(r,m),s&4&&-1<oE.indexOf(r)){for(;E!==null;){var T=Qn(E);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var P=$t(T.pendingLanes);if(P!==0){var X=T;for(X.pendingLanes|=2,X.entangledLanes|=2;P;){var re=1<<31-be(P);X.entanglements[1]|=re,P&=~re}$i(T),(Dt&6)===0&&($d=Ze()+500,ou(0))}}break;case 31:case 13:X=Xt(T,2),X!==null&&gr(X,T,2),Vd(),wm(T,2)}if(T=km(m),T===null&&um(r,s,m,lf,c),T===E)break;E=T}E!==null&&m.stopPropagation()}else um(r,s,m,null,c)}}function km(r){return r=Hs(r),Em(r)}var lf=null;function Em(r){if(lf=null,r=Mn(r),r!==null){var s=l(r);if(s===null)r=null;else{var c=s.tag;if(c===13){if(r=u(s),r!==null)return r;r=null}else if(c===31){if(r=a(s),r!==null)return r;r=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return lf=r,null}function uy(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(dt()){case ce:return 2;case xe:return 8;case pe:case Me:return 32;case Le:return 268435456;default:return 32}default:return 32}}var Am=!1,go=null,vo=null,_o=null,hu=new Map,pu=new Map,yo=[],oE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dy(r,s){switch(r){case"focusin":case"focusout":go=null;break;case"dragenter":case"dragleave":vo=null;break;case"mouseover":case"mouseout":_o=null;break;case"pointerover":case"pointerout":hu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(s.pointerId)}}function mu(r,s,c,m,E,T){return r===null||r.nativeEvent!==T?(r={blockedOn:s,domEventName:c,eventSystemFlags:m,nativeEvent:T,targetContainers:[E]},s!==null&&(s=Qn(s),s!==null&&ly(s)),r):(r.eventSystemFlags|=m,s=r.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),r)}function aE(r,s,c,m,E){switch(s){case"focusin":return go=mu(go,r,s,c,m,E),!0;case"dragenter":return vo=mu(vo,r,s,c,m,E),!0;case"mouseover":return _o=mu(_o,r,s,c,m,E),!0;case"pointerover":var T=E.pointerId;return hu.set(T,mu(hu.get(T)||null,r,s,c,m,E)),!0;case"gotpointercapture":return T=E.pointerId,pu.set(T,mu(pu.get(T)||null,r,s,c,m,E)),!0}return!1}function fy(r){var s=Mn(r.target);if(s!==null){var c=l(s);if(c!==null){if(s=c.tag,s===13){if(s=u(c),s!==null){r.blockedOn=s,Cn(r.priority,function(){cy(c)});return}}else if(s===31){if(s=a(c),s!==null){r.blockedOn=s,Cn(r.priority,function(){cy(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function cf(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var c=km(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);Fs=m,c.target.dispatchEvent(m),Fs=null}else return s=Qn(c),s!==null&&ly(s),r.blockedOn=c,!1;s.shift()}return!0}function hy(r,s,c){cf(r)&&c.delete(s)}function lE(){Am=!1,go!==null&&cf(go)&&(go=null),vo!==null&&cf(vo)&&(vo=null),_o!==null&&cf(_o)&&(_o=null),hu.forEach(hy),pu.forEach(hy)}function uf(r,s){r.blockedOn===s&&(r.blockedOn=null,Am||(Am=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,lE)))}var df=null;function py(r){df!==r&&(df=r,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){df===r&&(df=null);for(var s=0;s<r.length;s+=3){var c=r[s],m=r[s+1],E=r[s+2];if(typeof m!="function"){if(Em(m||c)===null)continue;break}var T=Qn(c);T!==null&&(r.splice(s,3),s-=3,kp(T,{pending:!0,data:E,method:c.method,action:m},m,E))}}))}function Bl(r){function s(re){return uf(re,r)}go!==null&&uf(go,r),vo!==null&&uf(vo,r),_o!==null&&uf(_o,r),hu.forEach(s),pu.forEach(s);for(var c=0;c<yo.length;c++){var m=yo[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<yo.length&&(c=yo[0],c.blockedOn===null);)fy(c),c.blockedOn===null&&yo.shift();if(c=(r.ownerDocument||r).$$reactFormReplay,c!=null)for(m=0;m<c.length;m+=3){var E=c[m],T=c[m+1],P=E[en]||null;if(typeof T=="function")P||py(c);else if(P){var X=null;if(T&&T.hasAttribute("formAction")){if(E=T,P=T[en]||null)X=P.formAction;else if(Em(E)!==null)continue}else X=P.action;typeof X=="function"?c[m+1]=X:(c.splice(m,3),m-=3),py(c)}}}function my(){function r(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function(P){return E=P})},focusReset:"manual",scroll:"manual"})}function s(){E!==null&&(E(),E=null),m||setTimeout(c,20)}function c(){if(!m&&!navigation.transition){var T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,E=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),E!==null&&(E(),E=null)}}}function Rm(r){this._internalRoot=r}ff.prototype.render=Rm.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var c=s.current,m=jr();oy(c,m,r,s,null,null)},ff.prototype.unmount=Rm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;oy(r.current,2,null,r,null,null),Vd(),s[Nn]=null}};function ff(r){this._internalRoot=r}ff.prototype.unstable_scheduleHydration=function(r){if(r){var s=pn();r={blockedOn:null,target:r,priority:s};for(var c=0;c<yo.length&&s!==0&&s<yo[c].priority;c++);yo.splice(c,0,r),c===0&&fy(r)}};var gy=e.version;if(gy!=="19.2.4")throw Error(i(527,gy,"19.2.4"));Y.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(s),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var cE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hf.isDisabled&&hf.supportsFiber)try{Ve=hf.inject(cE),ct=hf}catch{}}return vu.createRoot=function(r,s){if(!o(r))throw Error(i(299));var c=!1,m="",E=w_,T=C_,P=k_;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(E=s.onUncaughtError),s.onCaughtError!==void 0&&(T=s.onCaughtError),s.onRecoverableError!==void 0&&(P=s.onRecoverableError)),s=iy(r,1,!1,null,null,c,m,null,E,T,P,my),r[Nn]=s.current,cm(r),new Rm(s)},vu.hydrateRoot=function(r,s,c){if(!o(r))throw Error(i(299));var m=!1,E="",T=w_,P=C_,X=k_,re=null;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(E=c.identifierPrefix),c.onUncaughtError!==void 0&&(T=c.onUncaughtError),c.onCaughtError!==void 0&&(P=c.onCaughtError),c.onRecoverableError!==void 0&&(X=c.onRecoverableError),c.formState!==void 0&&(re=c.formState)),s=iy(r,1,!0,s,c!=null?c:null,m,E,re,T,P,X,my),s.context=sy(null),c=s.current,m=jr(),m=li(m),E=ro(m),E.callback=null,io(c,E,m),c=m,s.current.lanes=c,Un(s,c),$i(s),r[Nn]=s.current,cm(r),new ff(s)},vu.version="19.2.4",vu}var Ey;function yE(){if(Ey)return Dm.exports;Ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Dm.exports=_E(),Dm.exports}var bE=yE();const Ay="jean2-theme",i1="neutral",Lx="system",xE={mode:Lx,scheme:i1,setMode:()=>null,setScheme:()=>null,resolvedMode:"dark"},Ix=D.createContext(xE);function SE(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ry(t){return t==="system"?SE():t}function wE(t){const e=localStorage.getItem(Ay);if(!e||!["light","dark","system"].includes(e))return null;const i={mode:e,scheme:i1};return localStorage.setItem(t,JSON.stringify(i)),localStorage.removeItem(Ay),i}function CE({children:t,defaultMode:e=Lx,defaultScheme:n=i1,storageKey:i="jean2-theme-settings",...o}){const[l,u]=D.useState(()=>{const S=wE(i);if(S)return S;const C=localStorage.getItem(i);if(C)try{const w=JSON.parse(C);if(typeof w=="object"&&w!==null&&"mode"in w&&"scheme"in w)return w}catch{}return{mode:e,scheme:n}}),[a,d]=D.useState(()=>Ry(l.mode)),f=D.useCallback((S,C)=>{const w=window.document.documentElement,v=Ry(S);w.classList.remove("light","dark"),w.classList.remove("neutral","ocean","forest","sunset","amethyst"),w.classList.add(v),w.classList.add(C),d(v)},[]);D.useEffect(()=>{f(l.mode,l.scheme)},[l,f]),D.useEffect(()=>{if(l.mode!=="system")return;const S=window.matchMedia("(prefers-color-scheme: dark)"),C=()=>{f(l.mode,l.scheme)};return S.addEventListener("change",C),()=>S.removeEventListener("change",C)},[l.mode,l.scheme,f]);const p=D.useCallback(S=>{const C={...l,mode:S};u(C),localStorage.setItem(i,JSON.stringify(C))},[l,i]),h=D.useCallback(S=>{const C={...l,scheme:S};u(C),localStorage.setItem(i,JSON.stringify(C))},[l,i]),y={mode:l.mode,scheme:l.scheme,setMode:p,setScheme:h,resolvedMode:a};return g.jsx(Ix.Provider,{...o,value:y,children:t})}const kE=()=>{const t=D.useContext(Ix);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};var Lm={exports:{}},Im={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* react-compiler-runtime.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var Ty;function EE(){if(Ty)return Im;Ty=1;var t=rh().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Im.c=function(e){return t.H.useMemoCache(e)},Im}var Ny;function AE(){return Ny||(Ny=1,Lm.exports=EE()),Lm.exports}var ve=AE();/**
|
|
58
|
+
* @license lucide-react v0.577.0 - ISC
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the ISC license.
|
|
61
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
+
*/const Bx=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/**
|
|
63
|
+
* @license lucide-react v0.577.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
66
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/const RE=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
68
|
+
* @license lucide-react v0.577.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/const TE=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase());/**
|
|
73
|
+
* @license lucide-react v0.577.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/const Dy=t=>{const e=TE(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
|
|
78
|
+
* @license lucide-react v0.577.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/var NE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
83
|
+
* @license lucide-react v0.577.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const DE=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};/**
|
|
88
|
+
* @license lucide-react v0.577.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const ME=D.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:u,...a},d)=>D.createElement("svg",{ref:d,...NE,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:Bx("lucide",o),...!l&&!DE(a)&&{"aria-hidden":"true"},...a},[...u.map(([f,p])=>D.createElement(f,p)),...Array.isArray(l)?l:[l]]));/**
|
|
93
|
+
* @license lucide-react v0.577.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const Ie=(t,e)=>{const n=D.forwardRef(({className:i,...o},l)=>D.createElement(ME,{ref:l,iconNode:e,className:Bx(`lucide-${RE(Dy(t))}`,`lucide-${t}`,i),...o}));return n.displayName=Dy(t),n};/**
|
|
98
|
+
* @license lucide-react v0.577.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const jE=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],OE=Ie("archive",jE);/**
|
|
103
|
+
* @license lucide-react v0.577.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const LE=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],IE=Ie("arrow-left",LE);/**
|
|
108
|
+
* @license lucide-react v0.577.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const BE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],zE=Ie("bot",BE);/**
|
|
113
|
+
* @license lucide-react v0.577.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const PE=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Cg=Ie("box",PE);/**
|
|
118
|
+
* @license lucide-react v0.577.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const FE=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],My=Ie("brain",FE);/**
|
|
123
|
+
* @license lucide-react v0.577.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
126
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
+
*/const HE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ds=Ie("check",HE);/**
|
|
128
|
+
* @license lucide-react v0.577.0 - ISC
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the ISC license.
|
|
131
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
+
*/const UE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sc=Ie("chevron-down",UE);/**
|
|
133
|
+
* @license lucide-react v0.577.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/const $E=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qE=Ie("chevron-left",$E);/**
|
|
138
|
+
* @license lucide-react v0.577.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/const VE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ai=Ie("chevron-right",VE);/**
|
|
143
|
+
* @license lucide-react v0.577.0 - ISC
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the ISC license.
|
|
146
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
+
*/const WE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],GE=Ie("chevron-up",WE);/**
|
|
148
|
+
* @license lucide-react v0.577.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
151
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
+
*/const KE=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],zx=Ie("chevrons-up-down",KE);/**
|
|
153
|
+
* @license lucide-react v0.577.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
156
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
+
*/const YE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Nu=Ie("circle-alert",YE);/**
|
|
158
|
+
* @license lucide-react v0.577.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
161
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
+
*/const XE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Gu=Ie("circle-check-big",XE);/**
|
|
163
|
+
* @license lucide-react v0.577.0 - ISC
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the ISC license.
|
|
166
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/const QE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ZE=Ie("circle-check",QE);/**
|
|
168
|
+
* @license lucide-react v0.577.0 - ISC
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the ISC license.
|
|
171
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/const JE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ih=Ie("circle-x",JE);/**
|
|
173
|
+
* @license lucide-react v0.577.0 - ISC
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the ISC license.
|
|
176
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
+
*/const e4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],t4=Ie("circle",e4);/**
|
|
178
|
+
* @license lucide-react v0.577.0 - ISC
|
|
179
|
+
*
|
|
180
|
+
* This source code is licensed under the ISC license.
|
|
181
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
+
*/const n4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Px=Ie("clock",n4);/**
|
|
183
|
+
* @license lucide-react v0.577.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
186
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
+
*/const r4=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],i4=Ie("cog",r4);/**
|
|
188
|
+
* @license lucide-react v0.577.0 - ISC
|
|
189
|
+
*
|
|
190
|
+
* This source code is licensed under the ISC license.
|
|
191
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
+
*/const s4=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ou=Ie("copy",s4);/**
|
|
193
|
+
* @license lucide-react v0.577.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the ISC license.
|
|
196
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
+
*/const o4=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],jy=Ie("cpu",o4);/**
|
|
198
|
+
* @license lucide-react v0.577.0 - ISC
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the ISC license.
|
|
201
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/const a4=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Fx=Ie("ellipsis",a4);/**
|
|
203
|
+
* @license lucide-react v0.577.0 - ISC
|
|
204
|
+
*
|
|
205
|
+
* This source code is licensed under the ISC license.
|
|
206
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
+
*/const l4=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],kg=Ie("external-link",l4);/**
|
|
208
|
+
* @license lucide-react v0.577.0 - ISC
|
|
209
|
+
*
|
|
210
|
+
* This source code is licensed under the ISC license.
|
|
211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
+
*/const c4=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],u4=Ie("eye-off",c4);/**
|
|
213
|
+
* @license lucide-react v0.577.0 - ISC
|
|
214
|
+
*
|
|
215
|
+
* This source code is licensed under the ISC license.
|
|
216
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
+
*/const d4=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],f4=Ie("eye",d4);/**
|
|
218
|
+
* @license lucide-react v0.577.0 - ISC
|
|
219
|
+
*
|
|
220
|
+
* This source code is licensed under the ISC license.
|
|
221
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
+
*/const h4=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],p4=Ie("file-pen",h4);/**
|
|
223
|
+
* @license lucide-react v0.577.0 - ISC
|
|
224
|
+
*
|
|
225
|
+
* This source code is licensed under the ISC license.
|
|
226
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
+
*/const m4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],s1=Ie("file-text",m4);/**
|
|
228
|
+
* @license lucide-react v0.577.0 - ISC
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the ISC license.
|
|
231
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/const g4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],qi=Ie("file",g4);/**
|
|
233
|
+
* @license lucide-react v0.577.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*/const v4=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Eg=Ie("folder-open",v4);/**
|
|
238
|
+
* @license lucide-react v0.577.0 - ISC
|
|
239
|
+
*
|
|
240
|
+
* This source code is licensed under the ISC license.
|
|
241
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
+
*/const _4=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Ao=Ie("folder",_4);/**
|
|
243
|
+
* @license lucide-react v0.577.0 - ISC
|
|
244
|
+
*
|
|
245
|
+
* This source code is licensed under the ISC license.
|
|
246
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
+
*/const y4=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],b4=Ie("git-branch",y4);/**
|
|
248
|
+
* @license lucide-react v0.577.0 - ISC
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the ISC license.
|
|
251
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/const x4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],S4=Ie("info",x4);/**
|
|
253
|
+
* @license lucide-react v0.577.0 - ISC
|
|
254
|
+
*
|
|
255
|
+
* This source code is licensed under the ISC license.
|
|
256
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
+
*/const w4=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],C4=Ie("keyboard",w4);/**
|
|
258
|
+
* @license lucide-react v0.577.0 - ISC
|
|
259
|
+
*
|
|
260
|
+
* This source code is licensed under the ISC license.
|
|
261
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
+
*/const k4=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],E4=Ie("layout-grid",k4);/**
|
|
263
|
+
* @license lucide-react v0.577.0 - ISC
|
|
264
|
+
*
|
|
265
|
+
* This source code is licensed under the ISC license.
|
|
266
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
+
*/const A4=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],R4=Ie("layout-list",A4);/**
|
|
268
|
+
* @license lucide-react v0.577.0 - ISC
|
|
269
|
+
*
|
|
270
|
+
* This source code is licensed under the ISC license.
|
|
271
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
+
*/const T4=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],N4=Ie("link-2",T4);/**
|
|
273
|
+
* @license lucide-react v0.577.0 - ISC
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the ISC license.
|
|
276
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
+
*/const D4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Br=Ie("loader-circle",D4);/**
|
|
278
|
+
* @license lucide-react v0.577.0 - ISC
|
|
279
|
+
*
|
|
280
|
+
* This source code is licensed under the ISC license.
|
|
281
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
+
*/const M4=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],j4=Ie("lock",M4);/**
|
|
283
|
+
* @license lucide-react v0.577.0 - ISC
|
|
284
|
+
*
|
|
285
|
+
* This source code is licensed under the ISC license.
|
|
286
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
+
*/const O4=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],L4=Ie("message-square",O4);/**
|
|
288
|
+
* @license lucide-react v0.577.0 - ISC
|
|
289
|
+
*
|
|
290
|
+
* This source code is licensed under the ISC license.
|
|
291
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
292
|
+
*/const I4=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Hx=Ie("minimize-2",I4);/**
|
|
293
|
+
* @license lucide-react v0.577.0 - ISC
|
|
294
|
+
*
|
|
295
|
+
* This source code is licensed under the ISC license.
|
|
296
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
297
|
+
*/const B4=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],z4=Ie("monitor",B4);/**
|
|
298
|
+
* @license lucide-react v0.577.0 - ISC
|
|
299
|
+
*
|
|
300
|
+
* This source code is licensed under the ISC license.
|
|
301
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
+
*/const P4=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],F4=Ie("moon",P4);/**
|
|
303
|
+
* @license lucide-react v0.577.0 - ISC
|
|
304
|
+
*
|
|
305
|
+
* This source code is licensed under the ISC license.
|
|
306
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
307
|
+
*/const H4=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],U4=Ie("palette",H4);/**
|
|
308
|
+
* @license lucide-react v0.577.0 - ISC
|
|
309
|
+
*
|
|
310
|
+
* This source code is licensed under the ISC license.
|
|
311
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
312
|
+
*/const $4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],q4=Ie("panel-left",$4);/**
|
|
313
|
+
* @license lucide-react v0.577.0 - ISC
|
|
314
|
+
*
|
|
315
|
+
* This source code is licensed under the ISC license.
|
|
316
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
317
|
+
*/const V4=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Ux=Ie("pause",V4);/**
|
|
318
|
+
* @license lucide-react v0.577.0 - ISC
|
|
319
|
+
*
|
|
320
|
+
* This source code is licensed under the ISC license.
|
|
321
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
322
|
+
*/const W4=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],G4=Ie("pencil",W4);/**
|
|
323
|
+
* @license lucide-react v0.577.0 - ISC
|
|
324
|
+
*
|
|
325
|
+
* This source code is licensed under the ISC license.
|
|
326
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
327
|
+
*/const K4=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Y4=Ie("plug-zap",K4);/**
|
|
328
|
+
* @license lucide-react v0.577.0 - ISC
|
|
329
|
+
*
|
|
330
|
+
* This source code is licensed under the ISC license.
|
|
331
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
332
|
+
*/const X4=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],Q4=Ie("plug",X4);/**
|
|
333
|
+
* @license lucide-react v0.577.0 - ISC
|
|
334
|
+
*
|
|
335
|
+
* This source code is licensed under the ISC license.
|
|
336
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
337
|
+
*/const Z4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],oc=Ie("plus",Z4);/**
|
|
338
|
+
* @license lucide-react v0.577.0 - ISC
|
|
339
|
+
*
|
|
340
|
+
* This source code is licensed under the ISC license.
|
|
341
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
342
|
+
*/const J4=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Gl=Ie("refresh-cw",J4);/**
|
|
343
|
+
* @license lucide-react v0.577.0 - ISC
|
|
344
|
+
*
|
|
345
|
+
* This source code is licensed under the ISC license.
|
|
346
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
347
|
+
*/const e5=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],$x=Ie("rotate-ccw",e5);/**
|
|
348
|
+
* @license lucide-react v0.577.0 - ISC
|
|
349
|
+
*
|
|
350
|
+
* This source code is licensed under the ISC license.
|
|
351
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
352
|
+
*/const t5=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],o1=Ie("search",t5);/**
|
|
353
|
+
* @license lucide-react v0.577.0 - ISC
|
|
354
|
+
*
|
|
355
|
+
* This source code is licensed under the ISC license.
|
|
356
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
357
|
+
*/const n5=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],r5=Ie("send",n5);/**
|
|
358
|
+
* @license lucide-react v0.577.0 - ISC
|
|
359
|
+
*
|
|
360
|
+
* This source code is licensed under the ISC license.
|
|
361
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
362
|
+
*/const i5=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Na=Ie("server",i5);/**
|
|
363
|
+
* @license lucide-react v0.577.0 - ISC
|
|
364
|
+
*
|
|
365
|
+
* This source code is licensed under the ISC license.
|
|
366
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
367
|
+
*/const s5=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],qx=Ie("settings",s5);/**
|
|
368
|
+
* @license lucide-react v0.577.0 - ISC
|
|
369
|
+
*
|
|
370
|
+
* This source code is licensed under the ISC license.
|
|
371
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
372
|
+
*/const o5=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Vx=Ie("shield",o5);/**
|
|
373
|
+
* @license lucide-react v0.577.0 - ISC
|
|
374
|
+
*
|
|
375
|
+
* This source code is licensed under the ISC license.
|
|
376
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
377
|
+
*/const a5=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Oy=Ie("square-terminal",a5);/**
|
|
378
|
+
* @license lucide-react v0.577.0 - ISC
|
|
379
|
+
*
|
|
380
|
+
* This source code is licensed under the ISC license.
|
|
381
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
382
|
+
*/const l5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Wx=Ie("square",l5);/**
|
|
383
|
+
* @license lucide-react v0.577.0 - ISC
|
|
384
|
+
*
|
|
385
|
+
* This source code is licensed under the ISC license.
|
|
386
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
387
|
+
*/const c5=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Ly=Ie("star",c5);/**
|
|
388
|
+
* @license lucide-react v0.577.0 - ISC
|
|
389
|
+
*
|
|
390
|
+
* This source code is licensed under the ISC license.
|
|
391
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
392
|
+
*/const u5=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],d5=Ie("sun",u5);/**
|
|
393
|
+
* @license lucide-react v0.577.0 - ISC
|
|
394
|
+
*
|
|
395
|
+
* This source code is licensed under the ISC license.
|
|
396
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
397
|
+
*/const f5=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Iy=Ie("terminal",f5);/**
|
|
398
|
+
* @license lucide-react v0.577.0 - ISC
|
|
399
|
+
*
|
|
400
|
+
* This source code is licensed under the ISC license.
|
|
401
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
402
|
+
*/const h5=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ac=Ie("trash-2",h5);/**
|
|
403
|
+
* @license lucide-react v0.577.0 - ISC
|
|
404
|
+
*
|
|
405
|
+
* This source code is licensed under the ISC license.
|
|
406
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
407
|
+
*/const p5=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Lu=Ie("triangle-alert",p5);/**
|
|
408
|
+
* @license lucide-react v0.577.0 - ISC
|
|
409
|
+
*
|
|
410
|
+
* This source code is licensed under the ISC license.
|
|
411
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
412
|
+
*/const m5=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],g5=Ie("undo-2",m5);/**
|
|
413
|
+
* @license lucide-react v0.577.0 - ISC
|
|
414
|
+
*
|
|
415
|
+
* This source code is licensed under the ISC license.
|
|
416
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
417
|
+
*/const v5=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],_5=Ie("unplug",v5);/**
|
|
418
|
+
* @license lucide-react v0.577.0 - ISC
|
|
419
|
+
*
|
|
420
|
+
* This source code is licensed under the ISC license.
|
|
421
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
422
|
+
*/const y5=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Gx=Ie("user",y5);/**
|
|
423
|
+
* @license lucide-react v0.577.0 - ISC
|
|
424
|
+
*
|
|
425
|
+
* This source code is licensed under the ISC license.
|
|
426
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
427
|
+
*/const b5=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],x5=Ie("volume-2",b5);/**
|
|
428
|
+
* @license lucide-react v0.577.0 - ISC
|
|
429
|
+
*
|
|
430
|
+
* This source code is licensed under the ISC license.
|
|
431
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
432
|
+
*/const S5=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],w5=Ie("volume-x",S5);/**
|
|
433
|
+
* @license lucide-react v0.577.0 - ISC
|
|
434
|
+
*
|
|
435
|
+
* This source code is licensed under the ISC license.
|
|
436
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
437
|
+
*/const C5=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Kx=Ie("wifi-off",C5);/**
|
|
438
|
+
* @license lucide-react v0.577.0 - ISC
|
|
439
|
+
*
|
|
440
|
+
* This source code is licensed under the ISC license.
|
|
441
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
442
|
+
*/const k5=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],E5=Ie("wifi",k5);/**
|
|
443
|
+
* @license lucide-react v0.577.0 - ISC
|
|
444
|
+
*
|
|
445
|
+
* This source code is licensed under the ISC license.
|
|
446
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
447
|
+
*/const A5=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],R5=Ie("wrench",A5);/**
|
|
448
|
+
* @license lucide-react v0.577.0 - ISC
|
|
449
|
+
*
|
|
450
|
+
* This source code is licensed under the ISC license.
|
|
451
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
452
|
+
*/const T5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ns=Ie("x",T5);/**
|
|
453
|
+
* @license lucide-react v0.577.0 - ISC
|
|
454
|
+
*
|
|
455
|
+
* This source code is licensed under the ISC license.
|
|
456
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
457
|
+
*/const N5=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Bm=Ie("zap",N5);function D5(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function a1(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var By;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(By||(By={}));async function M5(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await a1("plugin:event|unlisten",{event:t,eventId:e})}async function zy(t,e,n){var i;const o=(i=void 0)!==null&&i!==void 0?i:{kind:"Any"};return a1("plugin:event|listen",{event:t,target:o,handler:D5(e)}).then(l=>async()=>M5(t,l))}const zr={SERVERS:"jean2_servers",ACTIVE_SERVER_ID:"jean2_active_server_id",QUICK_CONNECTIONS:"jean2_quick_connections"};function Ts(){try{const t=localStorage.getItem(zr.SERVERS);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading saved servers from localStorage:",t),[]}}function j5(t){return Ts().find(n=>n.id===t)||null}function O5(t){try{const e=Ts();e.push(t),localStorage.setItem(zr.SERVERS,JSON.stringify(e))}catch(e){console.error("Error saving server to localStorage:",e)}}function L5(t,e){try{const n=Ts(),i=n.findIndex(o=>o.id===t);if(i===-1){console.error("Server not found:",t);return}n[i]={...n[i],...e},localStorage.setItem(zr.SERVERS,JSON.stringify(n))}catch(n){console.error("Error updating server in localStorage:",n)}}function I5(t){try{const n=Ts().filter(u=>u.id!==t);localStorage.setItem(zr.SERVERS,JSON.stringify(n));const o=Ci().filter(u=>u.serverId!==t);localStorage.setItem(zr.QUICK_CONNECTIONS,JSON.stringify(o)),Yx()===t&&localStorage.removeItem(zr.ACTIVE_SERVER_ID)}catch(e){console.error("Error deleting server from localStorage:",e)}}function Yx(){try{return localStorage.getItem(zr.ACTIVE_SERVER_ID)}catch(t){return console.error("Error reading active server ID from localStorage:",t),null}}function zm(t){try{localStorage.setItem(zr.ACTIVE_SERVER_ID,t)}catch(e){console.error("Error setting active server ID in localStorage:",e)}}function Py(){const t=Yx();return t?j5(t):null}function Ci(){try{const t=localStorage.getItem(zr.QUICK_CONNECTIONS);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading quick connections from localStorage:",t),[]}}function B5(t){const e=Ci(),n=e.reduce((o,l)=>Math.max(o,l.order),-1),i={...t,id:crypto.randomUUID(),order:n+1};e.push(i);try{localStorage.setItem(zr.QUICK_CONNECTIONS,JSON.stringify(e))}catch(o){console.error("Error saving quick connection to localStorage:",o)}return i}function z5(t){try{const n=Ci().filter(i=>i.id!==t);localStorage.setItem(zr.QUICK_CONNECTIONS,JSON.stringify(n))}catch(e){console.error("Error removing quick connection from localStorage:",e)}}function P5(t){try{const n=Ci().filter(i=>i.workspaceId!==t);localStorage.setItem(zr.QUICK_CONNECTIONS,JSON.stringify(n))}catch(e){console.error("Error removing quick connections for workspace from localStorage:",e)}}function F5(t){try{const e=Ci(),n=new Map(e.map(i=>[i.id,i]));t.forEach((i,o)=>{const l=n.get(i);l&&(l.order=o)}),localStorage.setItem(zr.QUICK_CONNECTIONS,JSON.stringify(e))}catch(e){console.error("Error reordering quick connections in localStorage:",e)}}function Xx(t){return/^[a-f0-9]{64}$/.test(t)}function H5(t){return t.length<12?t:`${t.slice(0,4)}...${t.slice(-4)}`}function Of(t){let e=t.trim();return e=e.replace(/^(https?:\/\/|wss?:\/\/)/i,""),e=e.replace(/\/+$/,""),e}const Qx=D.createContext(null),U5=t=>{const e=ve.c(30),{children:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[0]=i):i=e[0];const[o,l]=D.useState(i),[u,a]=D.useState(null);let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[1]=d):d=e[1];const[f,p]=D.useState(d),[h,y]=D.useState(!1),S=D.useRef(null),C=D.useRef(!1);let w,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{const J=Ts(),ne=Py(),Z=Ci();l(J),a(ne),p(Z)},v=[],e[2]=w,e[3]=v):(w=e[2],v=e[3]),D.useEffect(w,v);let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{C.current=!0},e[4]=b):b=e[4];const _=b;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=(J,ne,Z)=>{const W=Of(ne),U={id:crypto.randomUUID(),name:J,url:W,token:Z,createdAt:new Date().toISOString()};return O5(U),l(Ts()),zm(U.id),a(U),U},e[5]=x):x=e[5];const k=x;let N;e[6]!==(u==null?void 0:u.id)?(N=(J,ne)=>{const Z={...ne,...ne.url&&{url:Of(ne.url)}};L5(J,Z),l(Ts()),(u==null?void 0:u.id)===J&&a(Py())},e[6]=u==null?void 0:u.id,e[7]=N):N=e[7];const A=N;let M;e[8]!==(u==null?void 0:u.id)?(M=J=>{const ne=(u==null?void 0:u.id)===J;if(I5(J),l(Ts()),ne){const Z=Ts(),W=Z.length>0?Z[0]:null;W?(zm(W.id),a(W)):a(null)}p(Ci())},e[8]=u==null?void 0:u.id,e[9]=M):M=e[9];const R=M;let j;e[10]!==(u==null?void 0:u.id)||e[11]!==h||e[12]!==o?(j=J=>(S.current&&(clearTimeout(S.current),S.current=null),h&&(u==null?void 0:u.id)===J?!1:(h&&y(!1),y(!0),S.current=setTimeout(()=>{zm(J);const ne=o.find(Z=>Z.id===J)||null;a(ne),y(!1)},100),!0)),e[10]=u==null?void 0:u.id,e[11]=h,e[12]=o,e[13]=j):j=e[13];const O=j;let B;e[14]===Symbol.for("react.memo_cache_sentinel")?(B=()=>{y(!1)},e[14]=B):B=e[14];const q=B;let $;e[15]===Symbol.for("react.memo_cache_sentinel")?($=(J,ne,Z,W)=>{B5({serverId:J,serverName:ne,workspaceId:Z,workspaceName:W}),p(Ci())},e[15]=$):$=e[15];const V=$;let K;e[16]===Symbol.for("react.memo_cache_sentinel")?(K=J=>{z5(J),p(Ci())},e[16]=K):K=e[16];const G=K;let Y;e[17]===Symbol.for("react.memo_cache_sentinel")?(Y=J=>{P5(J),p(Ci())},e[17]=Y):Y=e[17];const Q=Y;let I;e[18]===Symbol.for("react.memo_cache_sentinel")?(I=J=>{F5(J),p(Ci())},e[18]=I):I=e[18];const L=I;let z;e[19]!==u||e[20]!==A||e[21]!==h||e[22]!==f||e[23]!==R||e[24]!==o||e[25]!==O?(z={servers:o,activeServer:u,quickConnections:f,isSwitching:h,isAddingServerRef:C,prepareForServerAdd:_,addServer:k,editServer:A,removeServer:R,switchServer:O,clearSwitchingState:q,addToQuickConnections:V,removeFromQuickConnections:G,removeFromQuickConnectionsByWorkspace:Q,reorderQuick:L},e[19]=u,e[20]=A,e[21]=h,e[22]=f,e[23]=R,e[24]=o,e[25]=O,e[26]=z):z=e[26];const H=z;let F;return e[27]!==n||e[28]!==H?(F=g.jsx(Qx.Provider,{value:H,children:n}),e[27]=n,e[28]=H,e[29]=F):F=e[29],F},lc=()=>{const t=D.useContext(Qx);if(t===null)throw new Error("useServerContext must be used within a ServerProvider");return t};function Zx(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Zx(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function sh(){for(var t,e,n=0,i="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Zx(t))&&(i&&(i+=" "),i+=e);return i}const Fy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Hy=sh,cc=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return Hy(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,u=Object.keys(o).map(f=>{const p=n==null?void 0:n[f],h=l==null?void 0:l[f];if(p===null)return null;const y=Fy(p)||Fy(h);return o[f][y]}),a=n&&Object.entries(n).reduce((f,p)=>{let[h,y]=p;return y===void 0||(f[h]=y),f},{}),d=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((f,p)=>{let{class:h,className:y,...S}=p;return Object.entries(S).every(C=>{let[w,v]=C;return Array.isArray(v)?v.includes({...l,...a}[w]):{...l,...a}[w]===v})?[...f,h,y]:f},[]);return Hy(t,u,d,n==null?void 0:n.class,n==null?void 0:n.className)};var Ku=Ox();const $5=nh(Ku);function Uy(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ms(...t){return e=>{let n=!1;const i=t.map(o=>{const l=Uy(o,e);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():Uy(t[o],null)}}}}function _t(...t){return D.useCallback(Ms(...t),t)}function Ro(t){const e=q5(t),n=D.forwardRef((i,o)=>{const{children:l,...u}=i,a=D.Children.toArray(l),d=a.find(W5);if(d){const f=d.props.children,p=a.map(h=>h===d?D.Children.count(f)>1?D.Children.only(null):D.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...u,ref:o,children:D.isValidElement(f)?D.cloneElement(f,void 0,p):null})}return g.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}var Yu=Ro("Slot");function q5(t){const e=D.forwardRef((n,i)=>{const{children:o,...l}=n;if(D.isValidElement(o)){const u=K5(o),a=G5(l,o.props);return o.type!==D.Fragment&&(a.ref=i?Ms(i,u):u),D.cloneElement(o,a)}return D.Children.count(o)>1?D.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Jx=Symbol("radix.slottable");function V5(t){const e=({children:n})=>g.jsx(g.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=Jx,e}function W5(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Jx}function G5(t,e){const n={...e};for(const i in e){const o=t[i],l=e[i];/^on[A-Z]/.test(i)?o&&l?n[i]=(...a)=>{const d=l(...a);return o(...a),d}:o&&(n[i]=o):i==="style"?n[i]={...o,...l}:i==="className"&&(n[i]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function K5(t){var i,o;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Y5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ge=Y5.reduce((t,e)=>{const n=Ro(`Primitive.${e}`),i=D.forwardRef((o,l)=>{const{asChild:u,...a}=o,d=u?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...a,ref:l})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function eS(t,e){t&&Ku.flushSync(()=>t.dispatchEvent(e))}var tS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),X5="VisuallyHidden",nS=D.forwardRef((t,e)=>g.jsx(Ge.span,{...t,ref:e,style:{...tS,...t.style}}));nS.displayName=X5;var Q5=nS;function Z5(t,e){const n=D.createContext(e),i=l=>{const{children:u,...a}=l,d=D.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:d,children:u})};i.displayName=t+"Provider";function o(l){const u=D.useContext(n);if(u)return u;if(e!==void 0)return e;throw new Error(`\`${l}\` must be used within \`${t}\``)}return[i,o]}function Hr(t,e=[]){let n=[];function i(l,u){const a=D.createContext(u),d=n.length;n=[...n,u];const f=h=>{var b;const{scope:y,children:S,...C}=h,w=((b=y==null?void 0:y[t])==null?void 0:b[d])||a,v=D.useMemo(()=>C,Object.values(C));return g.jsx(w.Provider,{value:v,children:S})};f.displayName=l+"Provider";function p(h,y){var w;const S=((w=y==null?void 0:y[t])==null?void 0:w[d])||a,C=D.useContext(S);if(C)return C;if(u!==void 0)return u;throw new Error(`\`${h}\` must be used within \`${l}\``)}return[f,p]}const o=()=>{const l=n.map(u=>D.createContext(u));return function(a){const d=(a==null?void 0:a[t])||l;return D.useMemo(()=>({[`__scope${t}`]:{...a,[t]:d}}),[a,d])}};return o.scopeName=t,[i,J5(o,...e)]}function J5(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=i.reduce((a,{useScope:d,scopeName:f})=>{const h=d(l)[`__scope${f}`];return{...a,...h}},{});return D.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])}};return n.scopeName=e.scopeName,n}function l1(t){const e=t+"CollectionProvider",[n,i]=Hr(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),u=w=>{const{scope:v,children:b}=w,_=ni.useRef(null),x=ni.useRef(new Map).current;return g.jsx(o,{scope:v,itemMap:x,collectionRef:_,children:b})};u.displayName=e;const a=t+"CollectionSlot",d=Ro(a),f=ni.forwardRef((w,v)=>{const{scope:b,children:_}=w,x=l(a,b),k=_t(v,x.collectionRef);return g.jsx(d,{ref:k,children:_})});f.displayName=a;const p=t+"CollectionItemSlot",h="data-radix-collection-item",y=Ro(p),S=ni.forwardRef((w,v)=>{const{scope:b,children:_,...x}=w,k=ni.useRef(null),N=_t(v,k),A=l(p,b);return ni.useEffect(()=>(A.itemMap.set(k,{ref:k,...x}),()=>void A.itemMap.delete(k))),g.jsx(y,{[h]:"",ref:N,children:_})});S.displayName=p;function C(w){const v=l(t+"CollectionConsumer",w);return ni.useCallback(()=>{const _=v.collectionRef.current;if(!_)return[];const x=Array.from(_.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((A,M)=>x.indexOf(A.ref.current)-x.indexOf(M.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:u,Slot:f,ItemSlot:S},C,i]}function Oe(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}var En=globalThis!=null&&globalThis.document?D.useLayoutEffect:()=>{},eA=jx[" useInsertionEffect ".trim().toString()]||En;function js({prop:t,defaultProp:e,onChange:n=()=>{},caller:i}){const[o,l,u]=tA({defaultProp:e,onChange:n}),a=t!==void 0,d=a?t:o;{const p=D.useRef(t!==void 0);D.useEffect(()=>{const h=p.current;h!==a&&console.warn(`${i} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,i])}const f=D.useCallback(p=>{var h;if(a){const y=nA(p)?p(t):p;y!==t&&((h=u.current)==null||h.call(u,y))}else l(p)},[a,t,l,u]);return[d,f]}function tA({defaultProp:t,onChange:e}){const[n,i]=D.useState(t),o=D.useRef(n),l=D.useRef(e);return eA(()=>{l.current=e},[e]),D.useEffect(()=>{var u;o.current!==n&&((u=l.current)==null||u.call(l,n),o.current=n)},[n,o]),[n,i,l]}function nA(t){return typeof t=="function"}function rA(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var An=t=>{const{present:e,children:n}=t,i=iA(e),o=typeof n=="function"?n({present:i.isPresent}):D.Children.only(n),l=_t(i.ref,sA(o));return typeof n=="function"||i.isPresent?D.cloneElement(o,{ref:l}):null};An.displayName="Presence";function iA(t){const[e,n]=D.useState(),i=D.useRef(null),o=D.useRef(t),l=D.useRef("none"),u=t?"mounted":"unmounted",[a,d]=rA(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{const f=pf(i.current);l.current=a==="mounted"?f:"none"},[a]),En(()=>{const f=i.current,p=o.current;if(p!==t){const y=l.current,S=pf(f);t?d("MOUNT"):S==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(p&&y!==S?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),En(()=>{var f;if(e){let p;const h=(f=e.ownerDocument.defaultView)!=null?f:window,y=C=>{const v=pf(i.current).includes(CSS.escape(C.animationName));if(C.target===e&&v&&(d("ANIMATION_END"),!o.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",p=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},S=C=>{C.target===e&&(l.current=pf(i.current))};return e.addEventListener("animationstart",S),e.addEventListener("animationcancel",y),e.addEventListener("animationend",y),()=>{h.clearTimeout(p),e.removeEventListener("animationstart",S),e.removeEventListener("animationcancel",y),e.removeEventListener("animationend",y)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:D.useCallback(f=>{i.current=f?getComputedStyle(f):null,n(f)},[])}}function pf(t){return(t==null?void 0:t.animationName)||"none"}function sA(t){var i,o;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var oA=jx[" useId ".trim().toString()]||(()=>{}),aA=0;function wn(t){const[e,n]=D.useState(oA());return En(()=>{n(i=>i!=null?i:String(aA++))},[t]),e?`radix-${e}`:""}var oh="Collapsible",[lA]=Hr(oh),[cA,c1]=lA(oh),rS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:i,defaultOpen:o,disabled:l,onOpenChange:u,...a}=t,[d,f]=js({prop:i,defaultProp:o!=null?o:!1,onChange:u,caller:oh});return g.jsx(cA,{scope:n,disabled:l,contentId:wn(),open:d,onOpenToggle:D.useCallback(()=>f(p=>!p),[f]),children:g.jsx(Ge.div,{"data-state":d1(d),"data-disabled":l?"":void 0,...a,ref:e})})});rS.displayName=oh;var iS="CollapsibleTrigger",sS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,...i}=t,o=c1(iS,n);return g.jsx(Ge.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":d1(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...i,ref:e,onClick:Oe(t.onClick,o.onOpenToggle)})});sS.displayName=iS;var u1="CollapsibleContent",oS=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=c1(u1,t.__scopeCollapsible);return g.jsx(An,{present:n||o.open,children:({present:l})=>g.jsx(uA,{...i,ref:e,present:l})})});oS.displayName=u1;var uA=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:i,children:o,...l}=t,u=c1(u1,n),[a,d]=D.useState(i),f=D.useRef(null),p=_t(e,f),h=D.useRef(0),y=h.current,S=D.useRef(0),C=S.current,w=u.open||a,v=D.useRef(w),b=D.useRef(void 0);return D.useEffect(()=>{const _=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(_)},[]),En(()=>{const _=f.current;if(_){b.current=b.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const x=_.getBoundingClientRect();h.current=x.height,S.current=x.width,v.current||(_.style.transitionDuration=b.current.transitionDuration,_.style.animationName=b.current.animationName),d(i)}},[u.open,i]),g.jsx(Ge.div,{"data-state":d1(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...l,ref:p,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:w&&o})});function d1(t){return t?"open":"closed"}var dA=rS,fA=D.createContext(void 0);function Xu(t){const e=D.useContext(fA);return t||e||"ltr"}function Hn(t){const e=D.useRef(t);return D.useEffect(()=>{e.current=t}),D.useMemo(()=>(...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)},[])}function hA(t,e=globalThis==null?void 0:globalThis.document){const n=Hn(t);D.useEffect(()=>{const i=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",i,{capture:!0}),()=>e.removeEventListener("keydown",i,{capture:!0})},[n,e])}var pA="DismissableLayer",Ag="dismissableLayer.update",mA="dismissableLayer.pointerDownOutside",gA="dismissableLayer.focusOutside",$y,aS=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uc=D.forwardRef((t,e)=>{var M;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:a,...d}=t,f=D.useContext(aS),[p,h]=D.useState(null),y=(M=p==null?void 0:p.ownerDocument)!=null?M:globalThis==null?void 0:globalThis.document,[,S]=D.useState({}),C=_t(e,R=>h(R)),w=Array.from(f.layers),[v]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(v),_=p?w.indexOf(p):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=_>=b,N=yA(R=>{const j=R.target,O=[...f.branches].some(B=>B.contains(j));!k||O||(o==null||o(R),u==null||u(R),R.defaultPrevented||a==null||a())},y),A=bA(R=>{const j=R.target;[...f.branches].some(B=>B.contains(j))||(l==null||l(R),u==null||u(R),R.defaultPrevented||a==null||a())},y);return hA(R=>{_===f.layers.size-1&&(i==null||i(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},y),D.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&($y=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),qy(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=$y)}},[p,y,n,f]),D.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),qy())},[p,f]),D.useEffect(()=>{const R=()=>S({});return document.addEventListener(Ag,R),()=>document.removeEventListener(Ag,R)},[]),g.jsx(Ge.div,{...d,ref:C,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:Oe(t.onFocusCapture,A.onFocusCapture),onBlurCapture:Oe(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Oe(t.onPointerDownCapture,N.onPointerDownCapture)})});uc.displayName=pA;var vA="DismissableLayerBranch",_A=D.forwardRef((t,e)=>{const n=D.useContext(aS),i=D.useRef(null),o=_t(e,i);return D.useEffect(()=>{const l=i.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),g.jsx(Ge.div,{...t,ref:o})});_A.displayName=vA;function yA(t,e=globalThis==null?void 0:globalThis.document){const n=Hn(t),i=D.useRef(!1),o=D.useRef(()=>{});return D.useEffect(()=>{const l=a=>{if(a.target&&!i.current){let d=function(){lS(mA,n,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=d,e.addEventListener("click",o.current,{once:!0})):d()}else e.removeEventListener("click",o.current);i.current=!1},u=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),e.removeEventListener("pointerdown",l),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>i.current=!0}}function bA(t,e=globalThis==null?void 0:globalThis.document){const n=Hn(t),i=D.useRef(!1);return D.useEffect(()=>{const o=l=>{l.target&&!i.current&&lS(gA,n,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function qy(){const t=new CustomEvent(Ag);document.dispatchEvent(t)}function lS(t,e,n,{discrete:i}){const o=n.originalEvent.target,l=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),i?eS(o,l):o.dispatchEvent(l)}var Pm="focusScope.autoFocusOnMount",Fm="focusScope.autoFocusOnUnmount",Vy={bubbles:!1,cancelable:!0},xA="FocusScope",Qu=D.forwardRef((t,e)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...u}=t,[a,d]=D.useState(null),f=Hn(o),p=Hn(l),h=D.useRef(null),y=_t(e,w=>d(w)),S=D.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;D.useEffect(()=>{if(i){let w=function(x){if(S.paused||!a)return;const k=x.target;a.contains(k)?h.current=k:ko(h.current,{select:!0})},v=function(x){if(S.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||ko(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const N of x)N.removedNodes.length>0&&ko(a)};document.addEventListener("focusin",w),document.addEventListener("focusout",v);const _=new MutationObserver(b);return a&&_.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",v),_.disconnect()}}},[i,a,S.paused]),D.useEffect(()=>{if(a){Gy.add(S);const w=document.activeElement;if(!a.contains(w)){const b=new CustomEvent(Pm,Vy);a.addEventListener(Pm,f),a.dispatchEvent(b),b.defaultPrevented||(SA(AA(cS(a)),{select:!0}),document.activeElement===w&&ko(a))}return()=>{a.removeEventListener(Pm,f),setTimeout(()=>{const b=new CustomEvent(Fm,Vy);a.addEventListener(Fm,p),a.dispatchEvent(b),b.defaultPrevented||ko(w!=null?w:document.body,{select:!0}),a.removeEventListener(Fm,p),Gy.remove(S)},0)}}},[a,f,p,S]);const C=D.useCallback(w=>{if(!n&&!i||S.paused)return;const v=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,b=document.activeElement;if(v&&b){const _=w.currentTarget,[x,k]=wA(_);x&&k?!w.shiftKey&&b===k?(w.preventDefault(),n&&ko(x,{select:!0})):w.shiftKey&&b===x&&(w.preventDefault(),n&&ko(k,{select:!0})):b===_&&w.preventDefault()}},[n,i,S.paused]);return g.jsx(Ge.div,{tabIndex:-1,...u,ref:y,onKeyDown:C})});Qu.displayName=xA;function SA(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(ko(i,{select:e}),document.activeElement!==n)return}function wA(t){const e=cS(t),n=Wy(e,t),i=Wy(e.reverse(),t);return[n,i]}function cS(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Wy(t,e){for(const n of t)if(!CA(n,{upTo:e}))return n}function CA(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function kA(t){return t instanceof HTMLInputElement&&"select"in t}function ko(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&kA(t)&&e&&t.select()}}var Gy=EA();function EA(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Ky(t,e),t.unshift(e)},remove(e){var n;t=Ky(t,e),(n=t[0])==null||n.resume()}}}function Ky(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function AA(t){return t.filter(e=>e.tagName!=="A")}var RA="Portal",dc=D.forwardRef((t,e)=>{var a;const{container:n,...i}=t,[o,l]=D.useState(!1);En(()=>l(!0),[]);const u=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return u?$5.createPortal(g.jsx(Ge.div,{...i,ref:e}),u):null});dc.displayName=RA;var Hm=0;function ah(){D.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!=null?e:Yy()),document.body.insertAdjacentElement("beforeend",(n=t[1])!=null?n:Yy()),Hm++,()=>{Hm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Hm--}},[])}function Yy(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Wi=function(){return Wi=Object.assign||function(e){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},Wi.apply(this,arguments)};function uS(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n}function TA(t,e,n){if(n||arguments.length===2)for(var i=0,o=e.length,l;i<o;i++)(l||!(i in e))&&(l||(l=Array.prototype.slice.call(e,0,i)),l[i]=e[i]);return t.concat(l||Array.prototype.slice.call(e))}var Af="right-scroll-bar-position",Rf="width-before-scroll-bar",NA="with-scroll-bars-hidden",DA="--removed-body-scroll-bar-size";function Um(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function MA(t,e){var n=D.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(i){var o=n.value;o!==i&&(n.value=i,n.callback(i,o))}}}})[0];return n.callback=e,n.facade}var jA=typeof window<"u"?D.useLayoutEffect:D.useEffect,Xy=new WeakMap;function OA(t,e){var n=MA(null,function(i){return t.forEach(function(o){return Um(o,i)})});return jA(function(){var i=Xy.get(n);if(i){var o=new Set(i),l=new Set(t),u=n.current;o.forEach(function(a){l.has(a)||Um(a,null)}),l.forEach(function(a){o.has(a)||Um(a,u)})}Xy.set(n,t)},[t]),n}function LA(t){return t}function IA(t,e){e===void 0&&(e=LA);var n=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(l){var u=e(l,i);return n.push(u),function(){n=n.filter(function(a){return a!==u})}},assignSyncMedium:function(l){for(i=!0;n.length;){var u=n;n=[],u.forEach(l)}n={push:function(a){return l(a)},filter:function(){return n}}},assignMedium:function(l){i=!0;var u=[];if(n.length){var a=n;n=[],a.forEach(l),u=n}var d=function(){var p=u;u=[],p.forEach(l)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){u.push(p),f()},filter:function(p){return u=u.filter(p),n}}}};return o}function BA(t){t===void 0&&(t={});var e=IA(null);return e.options=Wi({async:!0,ssr:!1},t),e}var dS=function(t){var e=t.sideCar,n=uS(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=e.read();if(!i)throw new Error("Sidecar medium not found");return D.createElement(i,Wi({},n))};dS.isSideCarExport=!0;function zA(t,e){return t.useMedium(e),dS}var fS=BA(),$m=function(){},lh=D.forwardRef(function(t,e){var n=D.useRef(null),i=D.useState({onScrollCapture:$m,onWheelCapture:$m,onTouchMoveCapture:$m}),o=i[0],l=i[1],u=t.forwardProps,a=t.children,d=t.className,f=t.removeScrollBar,p=t.enabled,h=t.shards,y=t.sideCar,S=t.noRelative,C=t.noIsolation,w=t.inert,v=t.allowPinchZoom,b=t.as,_=b===void 0?"div":b,x=t.gapMode,k=uS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=y,A=OA([n,e]),M=Wi(Wi({},k),o);return D.createElement(D.Fragment,null,p&&D.createElement(N,{sideCar:fS,removeScrollBar:f,shards:h,noRelative:S,noIsolation:C,inert:w,setCallbacks:l,allowPinchZoom:!!v,lockRef:n,gapMode:x}),u?D.cloneElement(D.Children.only(a),Wi(Wi({},M),{ref:A})):D.createElement(_,Wi({},M,{className:d,ref:A}),a))});lh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lh.classNames={fullWidth:Rf,zeroRight:Af};var PA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FA(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=PA();return e&&t.setAttribute("nonce",e),t}function HA(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function UA(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var $A=function(){var t=0,e=null;return{add:function(n){t==0&&(e=FA())&&(HA(e,n),UA(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},qA=function(){var t=$A();return function(e,n){D.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},hS=function(){var t=qA(),e=function(n){var i=n.styles,o=n.dynamic;return t(i,o),null};return e},VA={left:0,top:0,right:0,gap:0},qm=function(t){return parseInt(t||"",10)||0},WA=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],i=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[qm(n),qm(i),qm(o)]},GA=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return VA;var e=WA(t),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-n+e[2]-e[0])}},KA=hS(),Kl="data-scroll-locked",YA=function(t,e,n,i){var o=t.left,l=t.top,u=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
458
|
+
.`.concat(NA,` {
|
|
459
|
+
overflow: hidden `).concat(i,`;
|
|
460
|
+
padding-right: `).concat(a,"px ").concat(i,`;
|
|
461
|
+
}
|
|
462
|
+
body[`).concat(Kl,`] {
|
|
463
|
+
overflow: hidden `).concat(i,`;
|
|
464
|
+
overscroll-behavior: contain;
|
|
465
|
+
`).concat([e&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
466
|
+
padding-left: `.concat(o,`px;
|
|
467
|
+
padding-top: `).concat(l,`px;
|
|
468
|
+
padding-right: `).concat(u,`px;
|
|
469
|
+
margin-left:0;
|
|
470
|
+
margin-top:0;
|
|
471
|
+
margin-right: `).concat(a,"px ").concat(i,`;
|
|
472
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.`).concat(Af,` {
|
|
476
|
+
right: `).concat(a,"px ").concat(i,`;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.`).concat(Rf,` {
|
|
480
|
+
margin-right: `).concat(a,"px ").concat(i,`;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.`).concat(Af," .").concat(Af,` {
|
|
484
|
+
right: 0 `).concat(i,`;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.`).concat(Rf," .").concat(Rf,` {
|
|
488
|
+
margin-right: 0 `).concat(i,`;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
body[`).concat(Kl,`] {
|
|
492
|
+
`).concat(DA,": ").concat(a,`px;
|
|
493
|
+
}
|
|
494
|
+
`)},Qy=function(){var t=parseInt(document.body.getAttribute(Kl)||"0",10);return isFinite(t)?t:0},XA=function(){D.useEffect(function(){return document.body.setAttribute(Kl,(Qy()+1).toString()),function(){var t=Qy()-1;t<=0?document.body.removeAttribute(Kl):document.body.setAttribute(Kl,t.toString())}},[])},QA=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,o=i===void 0?"margin":i;XA();var l=D.useMemo(function(){return GA(o)},[o]);return D.createElement(KA,{styles:YA(l,!e,o,n?"":"!important")})},Rg=!1;if(typeof window<"u")try{var mf=Object.defineProperty({},"passive",{get:function(){return Rg=!0,!0}});window.addEventListener("test",mf,mf),window.removeEventListener("test",mf,mf)}catch{Rg=!1}var zl=Rg?{passive:!1}:!1,ZA=function(t){return t.tagName==="TEXTAREA"},pS=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!ZA(t)&&n[e]==="visible")},JA=function(t){return pS(t,"overflowY")},eR=function(t){return pS(t,"overflowX")},Zy=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=mS(t,i);if(o){var l=gS(t,i),u=l[1],a=l[2];if(u>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},tR=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},nR=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},mS=function(t,e){return t==="v"?JA(e):eR(e)},gS=function(t,e){return t==="v"?tR(e):nR(e)},rR=function(t,e){return t==="h"&&e==="rtl"?-1:1},iR=function(t,e,n,i,o){var l=rR(t,window.getComputedStyle(e).direction),u=l*i,a=n.target,d=e.contains(a),f=!1,p=u>0,h=0,y=0;do{if(!a)break;var S=gS(t,a),C=S[0],w=S[1],v=S[2],b=w-v-l*C;(C||b)&&mS(t,a)&&(h+=b,y+=C);var _=a.parentNode;a=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!d&&a!==document.body||d&&(e.contains(a)||e===a));return(p&&Math.abs(h)<1||!p&&Math.abs(y)<1)&&(f=!0),f},gf=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Jy=function(t){return[t.deltaX,t.deltaY]},eb=function(t){return t&&"current"in t?t.current:t},sR=function(t,e){return t[0]===e[0]&&t[1]===e[1]},oR=function(t){return`
|
|
495
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
496
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
497
|
+
`)},aR=0,Pl=[];function lR(t){var e=D.useRef([]),n=D.useRef([0,0]),i=D.useRef(),o=D.useState(aR++)[0],l=D.useState(hS)[0],u=D.useRef(t);D.useEffect(function(){u.current=t},[t]),D.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var w=TA([t.lockRef.current],(t.shards||[]).map(eb),!0).filter(Boolean);return w.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var a=D.useCallback(function(w,v){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var b=gf(w),_=n.current,x="deltaX"in w?w.deltaX:_[0]-b[0],k="deltaY"in w?w.deltaY:_[1]-b[1],N,A=w.target,M=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in w&&M==="h"&&A.type==="range")return!1;var R=window.getSelection(),j=R&&R.anchorNode,O=j?j===A||j.contains(A):!1;if(O)return!1;var B=Zy(M,A);if(!B)return!0;if(B?N=M:(N=M==="v"?"h":"v",B=Zy(M,A)),!B)return!1;if(!i.current&&"changedTouches"in w&&(x||k)&&(i.current=N),!N)return!0;var q=i.current||N;return iR(q,v,w,q==="h"?x:k)},[]),d=D.useCallback(function(w){var v=w;if(!(!Pl.length||Pl[Pl.length-1]!==l)){var b="deltaY"in v?Jy(v):gf(v),_=e.current.filter(function(N){return N.name===v.type&&(N.target===v.target||v.target===N.shadowParent)&&sR(N.delta,b)})[0];if(_&&_.should){v.cancelable&&v.preventDefault();return}if(!_){var x=(u.current.shards||[]).map(eb).filter(Boolean).filter(function(N){return N.contains(v.target)}),k=x.length>0?a(v,x[0]):!u.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),f=D.useCallback(function(w,v,b,_){var x={name:w,delta:v,target:b,should:_,shadowParent:cR(b)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(k){return k!==x})},1)},[]),p=D.useCallback(function(w){n.current=gf(w),i.current=void 0},[]),h=D.useCallback(function(w){f(w.type,Jy(w),w.target,a(w,t.lockRef.current))},[]),y=D.useCallback(function(w){f(w.type,gf(w),w.target,a(w,t.lockRef.current))},[]);D.useEffect(function(){return Pl.push(l),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",d,zl),document.addEventListener("touchmove",d,zl),document.addEventListener("touchstart",p,zl),function(){Pl=Pl.filter(function(w){return w!==l}),document.removeEventListener("wheel",d,zl),document.removeEventListener("touchmove",d,zl),document.removeEventListener("touchstart",p,zl)}},[]);var S=t.removeScrollBar,C=t.inert;return D.createElement(D.Fragment,null,C?D.createElement(l,{styles:oR(o)}):null,S?D.createElement(QA,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function cR(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const uR=zA(fS,lR);var Zu=D.forwardRef(function(t,e){return D.createElement(lh,Wi({},t,{ref:e,sideCar:uR}))});Zu.classNames=lh.classNames;var dR=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Fl=new WeakMap,vf=new WeakMap,_f={},Vm=0,vS=function(t){return t&&(t.host||vS(t.parentNode))},fR=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=vS(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},hR=function(t,e,n,i){var o=fR(e,Array.isArray(t)?t:[t]);_f[n]||(_f[n]=new WeakMap);var l=_f[n],u=[],a=new Set,d=new Set(o),f=function(h){!h||a.has(h)||(a.add(h),f(h.parentNode))};o.forEach(f);var p=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(y){if(a.has(y))p(y);else try{var S=y.getAttribute(i),C=S!==null&&S!=="false",w=(Fl.get(y)||0)+1,v=(l.get(y)||0)+1;Fl.set(y,w),l.set(y,v),u.push(y),w===1&&C&&vf.set(y,!0),v===1&&y.setAttribute(n,"true"),C||y.setAttribute(i,"true")}catch(b){console.error("aria-hidden: cannot operate on ",y,b)}})};return p(e),a.clear(),Vm++,function(){u.forEach(function(h){var y=Fl.get(h)-1,S=l.get(h)-1;Fl.set(h,y),l.set(h,S),y||(vf.has(h)||h.removeAttribute(i),vf.delete(h)),S||h.removeAttribute(n)}),Vm--,Vm||(Fl=new WeakMap,Fl=new WeakMap,vf=new WeakMap,_f={})}},ch=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),o=dR(t);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),hR(i,o,n,"aria-hidden")):function(){return null}},uh="Dialog",[_S]=Hr(uh),[pR,Ni]=_S(uh),yS=t=>{const{__scopeDialog:e,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:u=!0}=t,a=D.useRef(null),d=D.useRef(null),[f,p]=js({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:uh});return g.jsx(pR,{scope:e,triggerRef:a,contentRef:d,contentId:wn(),titleId:wn(),descriptionId:wn(),open:f,onOpenChange:p,onOpenToggle:D.useCallback(()=>p(h=>!h),[p]),modal:u,children:n})};yS.displayName=uh;var bS="DialogTrigger",xS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ni(bS,n),l=_t(e,o.triggerRef);return g.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":p1(o.open),...i,ref:l,onClick:Oe(t.onClick,o.onOpenToggle)})});xS.displayName=bS;var f1="DialogPortal",[mR,SS]=_S(f1,{forceMount:void 0}),wS=t=>{const{__scopeDialog:e,forceMount:n,children:i,container:o}=t,l=Ni(f1,e);return g.jsx(mR,{scope:e,forceMount:n,children:D.Children.map(i,u=>g.jsx(An,{present:n||l.open,children:g.jsx(dc,{asChild:!0,container:o,children:u})}))})};wS.displayName=f1;var Lf="DialogOverlay",CS=D.forwardRef((t,e)=>{const n=SS(Lf,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=Ni(Lf,t.__scopeDialog);return l.modal?g.jsx(An,{present:i||l.open,children:g.jsx(vR,{...o,ref:e})}):null});CS.displayName=Lf;var gR=Ro("DialogOverlay.RemoveScroll"),vR=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ni(Lf,n);return g.jsx(Zu,{as:gR,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(Ge.div,{"data-state":p1(o.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),Da="DialogContent",kS=D.forwardRef((t,e)=>{const n=SS(Da,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=Ni(Da,t.__scopeDialog);return g.jsx(An,{present:i||l.open,children:l.modal?g.jsx(_R,{...o,ref:e}):g.jsx(yR,{...o,ref:e})})});kS.displayName=Da;var _R=D.forwardRef((t,e)=>{const n=Ni(Da,t.__scopeDialog),i=D.useRef(null),o=_t(e,n.contentRef,i);return D.useEffect(()=>{const l=i.current;if(l)return ch(l)},[]),g.jsx(ES,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(t.onCloseAutoFocus,l=>{var u;l.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Oe(t.onPointerDownOutside,l=>{const u=l.detail.originalEvent,a=u.button===0&&u.ctrlKey===!0;(u.button===2||a)&&l.preventDefault()}),onFocusOutside:Oe(t.onFocusOutside,l=>l.preventDefault())})}),yR=D.forwardRef((t,e)=>{const n=Ni(Da,t.__scopeDialog),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(ES,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var u,a;(u=t.onCloseAutoFocus)==null||u.call(t,l),l.defaultPrevented||(i.current||(a=n.triggerRef.current)==null||a.focus(),l.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:l=>{var d,f;(d=t.onInteractOutside)==null||d.call(t,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(u))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),ES=D.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,...u}=t,a=Ni(Da,n),d=D.useRef(null),f=_t(e,d);return ah(),g.jsxs(g.Fragment,{children:[g.jsx(Qu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:g.jsx(uc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":p1(a.open),...u,ref:f,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(bR,{titleId:a.titleId}),g.jsx(SR,{contentRef:d,descriptionId:a.descriptionId})]})]})}),h1="DialogTitle",AS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ni(h1,n);return g.jsx(Ge.h2,{id:o.titleId,...i,ref:e})});AS.displayName=h1;var RS="DialogDescription",TS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ni(RS,n);return g.jsx(Ge.p,{id:o.descriptionId,...i,ref:e})});TS.displayName=RS;var NS="DialogClose",DS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=Ni(NS,n);return g.jsx(Ge.button,{type:"button",...i,ref:e,onClick:Oe(t.onClick,()=>o.onOpenChange(!1))})});DS.displayName=NS;function p1(t){return t?"open":"closed"}var MS="DialogTitleWarning",[zH,jS]=Z5(MS,{contentName:Da,titleName:h1,docsSlug:"dialog"}),bR=({titleId:t})=>{const e=jS(MS),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
498
|
+
|
|
499
|
+
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
500
|
+
|
|
501
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return D.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},xR="DialogDescriptionWarning",SR=({contentRef:t,descriptionId:e})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jS(xR).contentName}}.`;return D.useEffect(()=>{var l;const o=(l=t.current)==null?void 0:l.getAttribute("aria-describedby");e&&o&&(document.getElementById(e)||console.warn(i))},[i,t,e]),null},m1=yS,wR=xS,g1=wS,v1=CS,_1=kS,OS=AS,LS=TS,dh=DS;function CR(t){const e=D.useRef({value:t,previous:t});return D.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function kR(t){const[e,n]=D.useState(void 0);return En(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,a;if("borderBoxSize"in l){const d=l.borderBoxSize,f=Array.isArray(d)?d[0]:d;u=f.inlineSize,a=f.blockSize}else u=t.offsetWidth,a=t.offsetHeight;n({width:u,height:a})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}const ER=["top","right","bottom","left"],To=Math.min,Ir=Math.max,If=Math.round,yf=Math.floor,Ki=t=>({x:t,y:t}),AR={left:"right",right:"left",bottom:"top",top:"bottom"};function Tg(t,e,n){return Ir(t,To(e,n))}function Os(t,e){return typeof t=="function"?t(e):t}function Ls(t){return t.split("-")[0]}function fc(t){return t.split("-")[1]}function y1(t){return t==="x"?"y":"x"}function b1(t){return t==="y"?"height":"width"}function Gi(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function x1(t){return y1(Gi(t))}function RR(t,e,n){n===void 0&&(n=!1);const i=fc(t),o=x1(t),l=b1(o);let u=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(u=Bf(u)),[u,Bf(u)]}function TR(t){const e=Bf(t);return[Ng(t),e,Ng(e)]}function Ng(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const tb=["left","right"],nb=["right","left"],NR=["top","bottom"],DR=["bottom","top"];function MR(t,e,n){switch(t){case"top":case"bottom":return n?e?nb:tb:e?tb:nb;case"left":case"right":return e?NR:DR;default:return[]}}function jR(t,e,n,i){const o=fc(t);let l=MR(Ls(t),n==="start",i);return o&&(l=l.map(u=>u+"-"+o),e&&(l=l.concat(l.map(Ng)))),l}function Bf(t){const e=Ls(t);return AR[e]+t.slice(e.length)}function OR(t){return{top:0,right:0,bottom:0,left:0,...t}}function IS(t){return typeof t!="number"?OR(t):{top:t,right:t,bottom:t,left:t}}function zf(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function rb(t,e,n){let{reference:i,floating:o}=t;const l=Gi(e),u=x1(e),a=b1(u),d=Ls(e),f=l==="y",p=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,y=i[a]/2-o[a]/2;let S;switch(d){case"top":S={x:p,y:i.y-o.height};break;case"bottom":S={x:p,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:h};break;case"left":S={x:i.x-o.width,y:h};break;default:S={x:i.x,y:i.y}}switch(fc(e)){case"start":S[u]-=y*(n&&f?-1:1);break;case"end":S[u]+=y*(n&&f?-1:1);break}return S}async function LR(t,e){var n;e===void 0&&(e={});const{x:i,y:o,platform:l,rects:u,elements:a,strategy:d}=t,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:y=!1,padding:S=0}=Os(e,t),C=IS(S),v=a[y?h==="floating"?"reference":"floating":h],b=zf(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(v)))==null||n?v:v.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:d})),_=h==="floating"?{x:i,y:o,width:u.floating.width,height:u.floating.height}:u.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),k=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},N=zf(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:x,strategy:d}):_);return{top:(b.top-N.top+C.top)/k.y,bottom:(N.bottom-b.bottom+C.bottom)/k.y,left:(b.left-N.left+C.left)/k.x,right:(N.right-b.right+C.right)/k.x}}const IR=50,BR=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:u}=n,a=u.detectOverflow?u:{...u,detectOverflow:LR},d=await(u.isRTL==null?void 0:u.isRTL(e));let f=await u.getElementRects({reference:t,floating:e,strategy:o}),{x:p,y:h}=rb(f,i,d),y=i,S=0;const C={};for(let w=0;w<l.length;w++){const v=l[w];if(!v)continue;const{name:b,fn:_}=v,{x,y:k,data:N,reset:A}=await _({x:p,y:h,initialPlacement:i,placement:y,strategy:o,middlewareData:C,rects:f,platform:a,elements:{reference:t,floating:e}});p=x!=null?x:p,h=k!=null?k:h,C[b]={...C[b],...N},A&&S<IR&&(S++,typeof A=="object"&&(A.placement&&(y=A.placement),A.rects&&(f=A.rects===!0?await u.getElementRects({reference:t,floating:e,strategy:o}):A.rects),{x:p,y:h}=rb(f,y,d)),w=-1)}return{x:p,y:h,placement:y,strategy:o,middlewareData:C}},zR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:l,platform:u,elements:a,middlewareData:d}=e,{element:f,padding:p=0}=Os(t,e)||{};if(f==null)return{};const h=IS(p),y={x:n,y:i},S=x1(o),C=b1(S),w=await u.getDimensions(f),v=S==="y",b=v?"top":"left",_=v?"bottom":"right",x=v?"clientHeight":"clientWidth",k=l.reference[C]+l.reference[S]-y[S]-l.floating[C],N=y[S]-l.reference[S],A=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f));let M=A?A[x]:0;(!M||!await(u.isElement==null?void 0:u.isElement(A)))&&(M=a.floating[x]||l.floating[C]);const R=k/2-N/2,j=M/2-w[C]/2-1,O=To(h[b],j),B=To(h[_],j),q=O,$=M-w[C]-B,V=M/2-w[C]/2+R,K=Tg(q,V,$),G=!d.arrow&&fc(o)!=null&&V!==K&&l.reference[C]/2-(V<q?O:B)-w[C]/2<0,Y=G?V<q?V-q:V-$:0;return{[S]:y[S]+Y,data:{[S]:K,centerOffset:V-K-Y,...G&&{alignmentOffset:Y}},reset:G}}}),PR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:l,rects:u,initialPlacement:a,platform:d,elements:f}=e,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:w=!0,...v}=Os(t,e);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const b=Ls(o),_=Gi(a),x=Ls(a)===a,k=await(d.isRTL==null?void 0:d.isRTL(f.floating)),N=y||(x||!w?[Bf(a)]:TR(a)),A=C!=="none";!y&&A&&N.push(...jR(a,w,C,k));const M=[a,...N],R=await d.detectOverflow(e,v),j=[];let O=((i=l.flip)==null?void 0:i.overflows)||[];if(p&&j.push(R[b]),h){const V=RR(o,u,k);j.push(R[V[0]],R[V[1]])}if(O=[...O,{placement:o,overflows:j}],!j.every(V=>V<=0)){var B,q;const V=(((B=l.flip)==null?void 0:B.index)||0)+1,K=M[V];if(K&&(!(h==="alignment"?_!==Gi(K):!1)||O.every(Q=>Gi(Q.placement)===_?Q.overflows[0]>0:!0)))return{data:{index:V,overflows:O},reset:{placement:K}};let G=(q=O.filter(Y=>Y.overflows[0]<=0).sort((Y,Q)=>Y.overflows[1]-Q.overflows[1])[0])==null?void 0:q.placement;if(!G)switch(S){case"bestFit":{var $;const Y=($=O.filter(Q=>{if(A){const I=Gi(Q.placement);return I===_||I==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(I=>I>0).reduce((I,L)=>I+L,0)]).sort((Q,I)=>Q[1]-I[1])[0])==null?void 0:$[0];Y&&(G=Y);break}case"initialPlacement":G=a;break}if(o!==G)return{reset:{placement:G}}}return{}}}};function ib(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function sb(t){return ER.some(e=>t[e]>=0)}const FR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:i}=e,{strategy:o="referenceHidden",...l}=Os(t,e);switch(o){case"referenceHidden":{const u=await i.detectOverflow(e,{...l,elementContext:"reference"}),a=ib(u,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:sb(a)}}}case"escaped":{const u=await i.detectOverflow(e,{...l,altBoundary:!0}),a=ib(u,n.floating);return{data:{escapedOffsets:a,escaped:sb(a)}}}default:return{}}}}},BS=new Set(["left","top"]);async function HR(t,e){const{placement:n,platform:i,elements:o}=t,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=Ls(n),a=fc(n),d=Gi(n)==="y",f=BS.has(u)?-1:1,p=l&&d?-1:1,h=Os(e,t);let{mainAxis:y,crossAxis:S,alignmentAxis:C}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof C=="number"&&(S=a==="end"?C*-1:C),d?{x:S*p,y:y*f}:{x:y*f,y:S*p}}const UR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:l,placement:u,middlewareData:a}=e,d=await HR(e,t);return u===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+d.x,y:l+d.y,data:{...d,placement:u}}}}},$R=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o,platform:l}=e,{mainAxis:u=!0,crossAxis:a=!1,limiter:d={fn:b=>{let{x:_,y:x}=b;return{x:_,y:x}}},...f}=Os(t,e),p={x:n,y:i},h=await l.detectOverflow(e,f),y=Gi(Ls(o)),S=y1(y);let C=p[S],w=p[y];if(u){const b=S==="y"?"top":"left",_=S==="y"?"bottom":"right",x=C+h[b],k=C-h[_];C=Tg(x,C,k)}if(a){const b=y==="y"?"top":"left",_=y==="y"?"bottom":"right",x=w+h[b],k=w-h[_];w=Tg(x,w,k)}const v=d.fn({...e,[S]:C,[y]:w});return{...v,data:{x:v.x-n,y:v.y-i,enabled:{[S]:u,[y]:a}}}}}},qR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:o,rects:l,middlewareData:u}=e,{offset:a=0,mainAxis:d=!0,crossAxis:f=!0}=Os(t,e),p={x:n,y:i},h=Gi(o),y=y1(h);let S=p[y],C=p[h];const w=Os(a,e),v=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(d){const x=y==="y"?"height":"width",k=l.reference[y]-l.floating[x]+v.mainAxis,N=l.reference[y]+l.reference[x]-v.mainAxis;S<k?S=k:S>N&&(S=N)}if(f){var b,_;const x=y==="y"?"width":"height",k=BS.has(Ls(o)),N=l.reference[h]-l.floating[x]+(k&&((b=u.offset)==null?void 0:b[h])||0)+(k?0:v.crossAxis),A=l.reference[h]+l.reference[x]+(k?0:((_=u.offset)==null?void 0:_[h])||0)-(k?v.crossAxis:0);C<N?C=N:C>A&&(C=A)}return{[y]:S,[h]:C}}}},VR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:o,rects:l,platform:u,elements:a}=e,{apply:d=()=>{},...f}=Os(t,e),p=await u.detectOverflow(e,f),h=Ls(o),y=fc(o),S=Gi(o)==="y",{width:C,height:w}=l.floating;let v,b;h==="top"||h==="bottom"?(v=h,b=y===(await(u.isRTL==null?void 0:u.isRTL(a.floating))?"start":"end")?"left":"right"):(b=h,v=y==="end"?"top":"bottom");const _=w-p.top-p.bottom,x=C-p.left-p.right,k=To(w-p[v],_),N=To(C-p[b],x),A=!e.middlewareData.shift;let M=k,R=N;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=x),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(M=_),A&&!y){const O=Ir(p.left,0),B=Ir(p.right,0),q=Ir(p.top,0),$=Ir(p.bottom,0);S?R=C-2*(O!==0||B!==0?O+B:Ir(p.left,p.right)):M=w-2*(q!==0||$!==0?q+$:Ir(p.top,p.bottom))}await d({...e,availableWidth:R,availableHeight:M});const j=await u.getDimensions(a.floating);return C!==j.width||w!==j.height?{reset:{rects:!0}}:{}}}};function fh(){return typeof window<"u"}function hc(t){return zS(t)?(t.nodeName||"").toLowerCase():"#document"}function Pr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xi(t){var e;return(e=(zS(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zS(t){return fh()?t instanceof Node||t instanceof Pr(t).Node:!1}function Ri(t){return fh()?t instanceof Element||t instanceof Pr(t).Element:!1}function Is(t){return fh()?t instanceof HTMLElement||t instanceof Pr(t).HTMLElement:!1}function ob(t){return!fh()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Pr(t).ShadowRoot}function Ju(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=Ti(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&o!=="inline"&&o!=="contents"}function WR(t){return/^(table|td|th)$/.test(hc(t))}function hh(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const GR=/transform|translate|scale|rotate|perspective|filter/,KR=/paint|layout|strict|content/,Ea=t=>!!t&&t!=="none";let Wm;function S1(t){const e=Ri(t)?Ti(t):t;return Ea(e.transform)||Ea(e.translate)||Ea(e.scale)||Ea(e.rotate)||Ea(e.perspective)||!w1()&&(Ea(e.backdropFilter)||Ea(e.filter))||GR.test(e.willChange||"")||KR.test(e.contain||"")}function YR(t){let e=No(t);for(;Is(e)&&!Jl(e);){if(S1(e))return e;if(hh(e))return null;e=No(e)}return null}function w1(){return Wm==null&&(Wm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Wm}function Jl(t){return/^(html|body|#document)$/.test(hc(t))}function Ti(t){return Pr(t).getComputedStyle(t)}function ph(t){return Ri(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function No(t){if(hc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ob(t)&&t.host||Xi(t);return ob(e)?e.host:e}function PS(t){const e=No(t);return Jl(e)?t.ownerDocument?t.ownerDocument.body:t.body:Is(e)&&Ju(e)?e:PS(e)}function Iu(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=PS(t),l=o===((i=t.ownerDocument)==null?void 0:i.body),u=Pr(o);if(l){const a=Dg(u);return e.concat(u,u.visualViewport||[],Ju(o)?o:[],a&&n?Iu(a):[])}else return e.concat(o,Iu(o,[],n))}function Dg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function FS(t){const e=Ti(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=Is(t),l=o?t.offsetWidth:n,u=o?t.offsetHeight:i,a=If(n)!==l||If(i)!==u;return a&&(n=l,i=u),{width:n,height:i,$:a}}function C1(t){return Ri(t)?t:t.contextElement}function Yl(t){const e=C1(t);if(!Is(e))return Ki(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:l}=FS(e);let u=(l?If(n.width):n.width)/i,a=(l?If(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!a||!Number.isFinite(a))&&(a=1),{x:u,y:a}}const XR=Ki(0);function HS(t){const e=Pr(t);return!w1()||!e.visualViewport?XR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function QR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Pr(t)?!1:e}function Ma(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),l=C1(t);let u=Ki(1);e&&(i?Ri(i)&&(u=Yl(i)):u=Yl(t));const a=QR(l,n,i)?HS(l):Ki(0);let d=(o.left+a.x)/u.x,f=(o.top+a.y)/u.y,p=o.width/u.x,h=o.height/u.y;if(l){const y=Pr(l),S=i&&Ri(i)?Pr(i):i;let C=y,w=Dg(C);for(;w&&i&&S!==C;){const v=Yl(w),b=w.getBoundingClientRect(),_=Ti(w),x=b.left+(w.clientLeft+parseFloat(_.paddingLeft))*v.x,k=b.top+(w.clientTop+parseFloat(_.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,h*=v.y,d+=x,f+=k,C=Pr(w),w=Dg(C)}}return zf({width:p,height:h,x:d,y:f})}function mh(t,e){const n=ph(t).scrollLeft;return e?e.left+n:Ma(Xi(t)).left+n}function US(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-mh(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function ZR(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const l=o==="fixed",u=Xi(i),a=e?hh(e.floating):!1;if(i===u||a&&l)return n;let d={scrollLeft:0,scrollTop:0},f=Ki(1);const p=Ki(0),h=Is(i);if((h||!h&&!l)&&((hc(i)!=="body"||Ju(u))&&(d=ph(i)),h)){const S=Ma(i);f=Yl(i),p.x=S.x+i.clientLeft,p.y=S.y+i.clientTop}const y=u&&!h&&!l?US(u,d):Ki(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+y.x,y:n.y*f.y-d.scrollTop*f.y+p.y+y.y}}function JR(t){return Array.from(t.getClientRects())}function eT(t){const e=Xi(t),n=ph(t),i=t.ownerDocument.body,o=Ir(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),l=Ir(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+mh(t);const a=-n.scrollTop;return Ti(i).direction==="rtl"&&(u+=Ir(e.clientWidth,i.clientWidth)-o),{width:o,height:l,x:u,y:a}}const ab=25;function tT(t,e){const n=Pr(t),i=Xi(t),o=n.visualViewport;let l=i.clientWidth,u=i.clientHeight,a=0,d=0;if(o){l=o.width,u=o.height;const p=w1();(!p||p&&e==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const f=mh(i);if(f<=0){const p=i.ownerDocument,h=p.body,y=getComputedStyle(h),S=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(i.clientWidth-h.clientWidth-S);C<=ab&&(l-=C)}else f<=ab&&(l+=f);return{width:l,height:u,x:a,y:d}}function nT(t,e){const n=Ma(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,l=Is(t)?Yl(t):Ki(1),u=t.clientWidth*l.x,a=t.clientHeight*l.y,d=o*l.x,f=i*l.y;return{width:u,height:a,x:d,y:f}}function lb(t,e,n){let i;if(e==="viewport")i=tT(t,n);else if(e==="document")i=eT(Xi(t));else if(Ri(e))i=nT(e,n);else{const o=HS(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return zf(i)}function $S(t,e){const n=No(t);return n===e||!Ri(n)||Jl(n)?!1:Ti(n).position==="fixed"||$S(n,e)}function rT(t,e){const n=e.get(t);if(n)return n;let i=Iu(t,[],!1).filter(a=>Ri(a)&&hc(a)!=="body"),o=null;const l=Ti(t).position==="fixed";let u=l?No(t):t;for(;Ri(u)&&!Jl(u);){const a=Ti(u),d=S1(u);!d&&a.position==="fixed"&&(o=null),(l?!d&&!o:!d&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ju(u)&&!d&&$S(t,u))?i=i.filter(p=>p!==u):o=a,u=No(u)}return e.set(t,i),i}function iT(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const u=[...n==="clippingAncestors"?hh(e)?[]:rT(e,this._c):[].concat(n),i],a=lb(e,u[0],o);let d=a.top,f=a.right,p=a.bottom,h=a.left;for(let y=1;y<u.length;y++){const S=lb(e,u[y],o);d=Ir(S.top,d),f=To(S.right,f),p=To(S.bottom,p),h=Ir(S.left,h)}return{width:f-h,height:p-d,x:h,y:d}}function sT(t){const{width:e,height:n}=FS(t);return{width:e,height:n}}function oT(t,e,n){const i=Is(e),o=Xi(e),l=n==="fixed",u=Ma(t,!0,l,e);let a={scrollLeft:0,scrollTop:0};const d=Ki(0);function f(){d.x=mh(o)}if(i||!i&&!l)if((hc(e)!=="body"||Ju(o))&&(a=ph(e)),i){const S=Ma(e,!0,l,e);d.x=S.x+e.clientLeft,d.y=S.y+e.clientTop}else o&&f();l&&!i&&o&&f();const p=o&&!i&&!l?US(o,a):Ki(0),h=u.left+a.scrollLeft-d.x-p.x,y=u.top+a.scrollTop-d.y-p.y;return{x:h,y,width:u.width,height:u.height}}function Gm(t){return Ti(t).position==="static"}function cb(t,e){if(!Is(t)||Ti(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Xi(t)===n&&(n=n.ownerDocument.body),n}function qS(t,e){const n=Pr(t);if(hh(t))return n;if(!Is(t)){let o=No(t);for(;o&&!Jl(o);){if(Ri(o)&&!Gm(o))return o;o=No(o)}return n}let i=cb(t,e);for(;i&&WR(i)&&Gm(i);)i=cb(i,e);return i&&Jl(i)&&Gm(i)&&!S1(i)?n:i||YR(t)||n}const aT=async function(t){const e=this.getOffsetParent||qS,n=this.getDimensions,i=await n(t.floating);return{reference:oT(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function lT(t){return Ti(t).direction==="rtl"}const cT={convertOffsetParentRelativeRectToViewportRelativeRect:ZR,getDocumentElement:Xi,getClippingRect:iT,getOffsetParent:qS,getElementRects:aT,getClientRects:JR,getDimensions:sT,getScale:Yl,isElement:Ri,isRTL:lT};function VS(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function uT(t,e){let n=null,i;const o=Xi(t);function l(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function u(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),l();const f=t.getBoundingClientRect(),{left:p,top:h,width:y,height:S}=f;if(a||e(),!y||!S)return;const C=yf(h),w=yf(o.clientWidth-(p+y)),v=yf(o.clientHeight-(h+S)),b=yf(p),x={rootMargin:-C+"px "+-w+"px "+-v+"px "+-b+"px",threshold:Ir(0,To(1,d))||1};let k=!0;function N(A){const M=A[0].intersectionRatio;if(M!==d){if(!k)return u();M?u(!1,M):i=setTimeout(()=>{u(!1,1e-7)},1e3)}M===1&&!VS(f,t.getBoundingClientRect())&&u(),k=!1}try{n=new IntersectionObserver(N,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,x)}n.observe(t)}return u(!0),l}function dT(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,f=C1(t),p=o||l?[...f?Iu(f):[],...e?Iu(e):[]]:[];p.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),l&&b.addEventListener("resize",n)});const h=f&&a?uT(f,n):null;let y=-1,S=null;u&&(S=new ResizeObserver(b=>{let[_]=b;_&&_.target===f&&S&&e&&(S.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=S)==null||x.observe(e)})),n()}),f&&!d&&S.observe(f),e&&S.observe(e));let C,w=d?Ma(t):null;d&&v();function v(){const b=Ma(t);w&&!VS(w,b)&&n(),w=b,C=requestAnimationFrame(v)}return n(),()=>{var b;p.forEach(_=>{o&&_.removeEventListener("scroll",n),l&&_.removeEventListener("resize",n)}),h==null||h(),(b=S)==null||b.disconnect(),S=null,d&&cancelAnimationFrame(C)}}const fT=UR,hT=$R,pT=PR,mT=VR,gT=FR,ub=zR,vT=qR,_T=(t,e,n)=>{const i=new Map,o={platform:cT,...n},l={...o.platform,_c:i};return BR(t,e,{...o,platform:l})};var yT=typeof document<"u",bT=function(){},Tf=yT?D.useLayoutEffect:bT;function Pf(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!Pf(t[i],e[i]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,o[i]))return!1;for(i=n;i--!==0;){const l=o[i];if(!(l==="_owner"&&t.$$typeof)&&!Pf(t[l],e[l]))return!1}return!0}return t!==t&&e!==e}function WS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function db(t,e){const n=WS(t);return Math.round(e*n)/n}function Km(t){const e=D.useRef(t);return Tf(()=>{e.current=t}),e}function xT(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:u}={},transform:a=!0,whileElementsMounted:d,open:f}=t,[p,h]=D.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[y,S]=D.useState(i);Pf(y,i)||S(i);const[C,w]=D.useState(null),[v,b]=D.useState(null),_=D.useCallback(Q=>{Q!==A.current&&(A.current=Q,w(Q))},[]),x=D.useCallback(Q=>{Q!==M.current&&(M.current=Q,b(Q))},[]),k=l||C,N=u||v,A=D.useRef(null),M=D.useRef(null),R=D.useRef(p),j=d!=null,O=Km(d),B=Km(o),q=Km(f),$=D.useCallback(()=>{if(!A.current||!M.current)return;const Q={placement:e,strategy:n,middleware:y};B.current&&(Q.platform=B.current),_T(A.current,M.current,Q).then(I=>{const L={...I,isPositioned:q.current!==!1};V.current&&!Pf(R.current,L)&&(R.current=L,Ku.flushSync(()=>{h(L)}))})},[y,e,n,B,q]);Tf(()=>{f===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(Q=>({...Q,isPositioned:!1})))},[f]);const V=D.useRef(!1);Tf(()=>(V.current=!0,()=>{V.current=!1}),[]),Tf(()=>{if(k&&(A.current=k),N&&(M.current=N),k&&N){if(O.current)return O.current(k,N,$);$()}},[k,N,$,O,j]);const K=D.useMemo(()=>({reference:A,floating:M,setReference:_,setFloating:x}),[_,x]),G=D.useMemo(()=>({reference:k,floating:N}),[k,N]),Y=D.useMemo(()=>{const Q={position:n,left:0,top:0};if(!G.floating)return Q;const I=db(G.floating,p.x),L=db(G.floating,p.y);return a?{...Q,transform:"translate("+I+"px, "+L+"px)",...WS(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:L}},[n,a,G.floating,p.x,p.y]);return D.useMemo(()=>({...p,update:$,refs:K,elements:G,floatingStyles:Y}),[p,$,K,G,Y])}const ST=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:o}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?ub({element:i.current,padding:o}).fn(n):{}:i?ub({element:i,padding:o}).fn(n):{}}}},wT=(t,e)=>{const n=fT(t);return{name:n.name,fn:n.fn,options:[t,e]}},CT=(t,e)=>{const n=hT(t);return{name:n.name,fn:n.fn,options:[t,e]}},kT=(t,e)=>({fn:vT(t).fn,options:[t,e]}),ET=(t,e)=>{const n=pT(t);return{name:n.name,fn:n.fn,options:[t,e]}},AT=(t,e)=>{const n=mT(t);return{name:n.name,fn:n.fn,options:[t,e]}},RT=(t,e)=>{const n=gT(t);return{name:n.name,fn:n.fn,options:[t,e]}},TT=(t,e)=>{const n=ST(t);return{name:n.name,fn:n.fn,options:[t,e]}};var NT="Arrow",GS=D.forwardRef((t,e)=>{const{children:n,width:i=10,height:o=5,...l}=t;return g.jsx(Ge.svg,{...l,ref:e,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});GS.displayName=NT;var DT=GS,k1="Popper",[KS,Lo]=Hr(k1),[MT,YS]=KS(k1),XS=t=>{const{__scopePopper:e,children:n}=t,[i,o]=D.useState(null);return g.jsx(MT,{scope:e,anchor:i,onAnchorChange:o,children:n})};XS.displayName=k1;var QS="PopperAnchor",ZS=D.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...o}=t,l=YS(QS,n),u=D.useRef(null),a=_t(e,u),d=D.useRef(null);return D.useEffect(()=>{const f=d.current;d.current=(i==null?void 0:i.current)||u.current,f!==d.current&&l.onAnchorChange(d.current)}),i?null:g.jsx(Ge.div,{...o,ref:a})});ZS.displayName=QS;var E1="PopperContent",[jT,OT]=KS(E1),JS=D.forwardRef((t,e)=>{var W,U,te,ie,ae,se,_e,Te;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:y=!1,updatePositionStrategy:S="optimized",onPlaced:C,...w}=t,v=YS(E1,n),[b,_]=D.useState(null),x=_t(e,De=>_(De)),[k,N]=D.useState(null),A=kR(k),M=(W=A==null?void 0:A.width)!=null?W:0,R=(U=A==null?void 0:A.height)!=null?U:0,j=i+(l!=="center"?"-"+l:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},B=Array.isArray(f)?f:[f],q=B.length>0,$={padding:O,boundary:B.filter(IT),altBoundary:q},{refs:V,floatingStyles:K,placement:G,isPositioned:Y,middlewareData:Q}=xT({strategy:"fixed",placement:j,whileElementsMounted:(...De)=>dT(...De,{animationFrame:S==="always"}),elements:{reference:v.anchor},middleware:[wT({mainAxis:o+R,alignmentAxis:u}),d&&CT({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?kT():void 0,...$}),d&&ET({...$}),AT({...$,apply:({elements:De,rects:Ke,availableWidth:Ae,availableHeight:rt})=>{const{width:Je,height:Qe}=Ke.reference,ot=De.floating.style;ot.setProperty("--radix-popper-available-width",`${Ae}px`),ot.setProperty("--radix-popper-available-height",`${rt}px`),ot.setProperty("--radix-popper-anchor-width",`${Je}px`),ot.setProperty("--radix-popper-anchor-height",`${Qe}px`)}}),k&&TT({element:k,padding:a}),BT({arrowWidth:M,arrowHeight:R}),y&&RT({strategy:"referenceHidden",...$})]}),[I,L]=n2(G),z=Hn(C);En(()=>{Y&&(z==null||z())},[Y,z]);const H=(te=Q.arrow)==null?void 0:te.x,F=(ie=Q.arrow)==null?void 0:ie.y,J=((ae=Q.arrow)==null?void 0:ae.centerOffset)!==0,[ne,Z]=D.useState();return En(()=>{b&&Z(window.getComputedStyle(b).zIndex)},[b]),g.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:Y?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(se=Q.transformOrigin)==null?void 0:se.x,(_e=Q.transformOrigin)==null?void 0:_e.y].join(" "),...((Te=Q.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(jT,{scope:n,placedSide:I,onArrowChange:N,arrowX:H,arrowY:F,shouldHideArrow:J,children:g.jsx(Ge.div,{"data-side":I,"data-align":L,...w,ref:x,style:{...w.style,animation:Y?void 0:"none"}})})})});JS.displayName=E1;var e2="PopperArrow",LT={top:"bottom",right:"left",bottom:"top",left:"right"},t2=D.forwardRef(function(e,n){const{__scopePopper:i,...o}=e,l=OT(e2,i),u=LT[l.placedSide];return g.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:g.jsx(DT,{...o,ref:n,style:{...o.style,display:"block"}})})});t2.displayName=e2;function IT(t){return t!==null}var BT=t=>({name:"transformOrigin",options:t,fn(e){var v,b,_,x,k;const{placement:n,rects:i,middlewareData:o}=e,u=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=u?0:t.arrowWidth,d=u?0:t.arrowHeight,[f,p]=n2(n),h={start:"0%",center:"50%",end:"100%"}[p],y=((_=(b=o.arrow)==null?void 0:b.x)!=null?_:0)+a/2,S=((k=(x=o.arrow)==null?void 0:x.y)!=null?k:0)+d/2;let C="",w="";return f==="bottom"?(C=u?h:`${y}px`,w=`${-d}px`):f==="top"?(C=u?h:`${y}px`,w=`${i.floating.height+d}px`):f==="right"?(C=`${-d}px`,w=u?h:`${S}px`):f==="left"&&(C=`${i.floating.width+d}px`,w=u?h:`${S}px`),{data:{x:C,y:w}}}});function n2(t){const[e,n="center"]=t.split("-");return[e,n]}var gh=XS,ed=ZS,vh=JS,_h=t2,Ym="rovingFocusGroup.onEntryFocus",zT={bubbles:!1,cancelable:!0},td="RovingFocusGroup",[Mg,r2,PT]=l1(td),[FT,yh]=Hr(td,[PT]),[HT,UT]=FT(td),i2=D.forwardRef((t,e)=>g.jsx(Mg.Provider,{scope:t.__scopeRovingFocusGroup,children:g.jsx(Mg.Slot,{scope:t.__scopeRovingFocusGroup,children:g.jsx($T,{...t,ref:e})})}));i2.displayName=td;var $T=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:o=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...h}=t,y=D.useRef(null),S=_t(e,y),C=Xu(l),[w,v]=js({prop:u,defaultProp:a!=null?a:null,onChange:d,caller:td}),[b,_]=D.useState(!1),x=Hn(f),k=r2(n),N=D.useRef(!1),[A,M]=D.useState(0);return D.useEffect(()=>{const R=y.current;if(R)return R.addEventListener(Ym,x),()=>R.removeEventListener(Ym,x)},[x]),g.jsx(HT,{scope:n,orientation:i,dir:C,loop:o,currentTabStopId:w,onItemFocus:D.useCallback(R=>v(R),[v]),onItemShiftTab:D.useCallback(()=>_(!0),[]),onFocusableItemAdd:D.useCallback(()=>M(R=>R+1),[]),onFocusableItemRemove:D.useCallback(()=>M(R=>R-1),[]),children:g.jsx(Ge.div,{tabIndex:b||A===0?-1:0,"data-orientation":i,...h,ref:S,style:{outline:"none",...t.style},onMouseDown:Oe(t.onMouseDown,()=>{N.current=!0}),onFocus:Oe(t.onFocus,R=>{const j=!N.current;if(R.target===R.currentTarget&&j&&!b){const O=new CustomEvent(Ym,zT);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const B=k().filter(G=>G.focusable),q=B.find(G=>G.active),$=B.find(G=>G.id===w),K=[q,$,...B].filter(Boolean).map(G=>G.ref.current);a2(K,p)}}N.current=!1}),onBlur:Oe(t.onBlur,()=>_(!1))})})}),s2="RovingFocusGroupItem",o2=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,children:u,...a}=t,d=wn(),f=l||d,p=UT(s2,n),h=p.currentTabStopId===f,y=r2(n),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:w}=p;return D.useEffect(()=>{if(i)return S(),()=>C()},[i,S,C]),g.jsx(Mg.ItemSlot,{scope:n,id:f,focusable:i,active:o,children:g.jsx(Ge.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...a,ref:e,onMouseDown:Oe(t.onMouseDown,v=>{i?p.onItemFocus(f):v.preventDefault()}),onFocus:Oe(t.onFocus,()=>p.onItemFocus(f)),onKeyDown:Oe(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=WT(v,p.orientation,p.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=y().filter(k=>k.focusable).map(k=>k.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const k=x.indexOf(v.currentTarget);x=p.loop?GT(x,k+1):x.slice(k+1)}setTimeout(()=>a2(x))}}),children:typeof u=="function"?u({isCurrentTabStop:h,hasTabStop:w!=null}):u})})});o2.displayName=s2;var qT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VT(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function WT(t,e,n){const i=VT(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return qT[i]}function a2(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}function GT(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var l2=i2,c2=o2,jg=["Enter"," "],KT=["ArrowDown","PageUp","Home"],u2=["ArrowUp","PageDown","End"],YT=[...KT,...u2],XT={ltr:[...jg,"ArrowRight"],rtl:[...jg,"ArrowLeft"]},QT={ltr:["ArrowLeft"],rtl:["ArrowRight"]},nd="Menu",[Bu,ZT,JT]=l1(nd),[Ba,d2]=Hr(nd,[JT,Lo,yh]),bh=Lo(),f2=yh(),[e6,za]=Ba(nd),[t6,rd]=Ba(nd),h2=t=>{const{__scopeMenu:e,open:n=!1,children:i,dir:o,onOpenChange:l,modal:u=!0}=t,a=bh(e),[d,f]=D.useState(null),p=D.useRef(!1),h=Hn(l),y=Xu(o);return D.useEffect(()=>{const S=()=>{p.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>p.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),g.jsx(gh,{...a,children:g.jsx(e6,{scope:e,open:n,onOpenChange:h,content:d,onContentChange:f,children:g.jsx(t6,{scope:e,onClose:D.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:y,modal:u,children:i})})})};h2.displayName=nd;var n6="MenuAnchor",A1=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=bh(n);return g.jsx(ed,{...o,...i,ref:e})});A1.displayName=n6;var R1="MenuPortal",[r6,p2]=Ba(R1,{forceMount:void 0}),m2=t=>{const{__scopeMenu:e,forceMount:n,children:i,container:o}=t,l=za(R1,e);return g.jsx(r6,{scope:e,forceMount:n,children:g.jsx(An,{present:n||l.open,children:g.jsx(dc,{asChild:!0,container:o,children:i})})})};m2.displayName=R1;var ii="MenuContent",[i6,T1]=Ba(ii),g2=D.forwardRef((t,e)=>{const n=p2(ii,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=za(ii,t.__scopeMenu),u=rd(ii,t.__scopeMenu);return g.jsx(Bu.Provider,{scope:t.__scopeMenu,children:g.jsx(An,{present:i||l.open,children:g.jsx(Bu.Slot,{scope:t.__scopeMenu,children:u.modal?g.jsx(s6,{...o,ref:e}):g.jsx(o6,{...o,ref:e})})})})}),s6=D.forwardRef((t,e)=>{const n=za(ii,t.__scopeMenu),i=D.useRef(null),o=_t(e,i);return D.useEffect(()=>{const l=i.current;if(l)return ch(l)},[]),g.jsx(N1,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),o6=D.forwardRef((t,e)=>{const n=za(ii,t.__scopeMenu);return g.jsx(N1,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),a6=Ro("MenuContent.ScrollLock"),N1=D.forwardRef((t,e)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:a,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:y,onDismiss:S,disableOutsideScroll:C,...w}=t,v=za(ii,n),b=rd(ii,n),_=bh(n),x=f2(n),k=ZT(n),[N,A]=D.useState(null),M=D.useRef(null),R=_t(e,M,v.onContentChange),j=D.useRef(0),O=D.useRef(""),B=D.useRef(0),q=D.useRef(null),$=D.useRef("right"),V=D.useRef(0),K=C?Zu:D.Fragment,G=C?{as:a6,allowPinchZoom:!0}:void 0,Y=I=>{var W,U;const L=O.current+I,z=k().filter(te=>!te.disabled),H=document.activeElement,F=(W=z.find(te=>te.ref.current===H))==null?void 0:W.textValue,J=z.map(te=>te.textValue),ne=y6(J,L,F),Z=(U=z.find(te=>te.textValue===ne))==null?void 0:U.ref.current;(function te(ie){O.current=ie,window.clearTimeout(j.current),ie!==""&&(j.current=window.setTimeout(()=>te(""),1e3))})(L),Z&&setTimeout(()=>Z.focus())};D.useEffect(()=>()=>window.clearTimeout(j.current),[]),ah();const Q=D.useCallback(I=>{var z,H;return $.current===((z=q.current)==null?void 0:z.side)&&x6(I,(H=q.current)==null?void 0:H.area)},[]);return g.jsx(i6,{scope:n,searchRef:O,onItemEnter:D.useCallback(I=>{Q(I)&&I.preventDefault()},[Q]),onItemLeave:D.useCallback(I=>{var L;Q(I)||((L=M.current)==null||L.focus(),A(null))},[Q]),onTriggerLeave:D.useCallback(I=>{Q(I)&&I.preventDefault()},[Q]),pointerGraceTimerRef:B,onPointerGraceIntentChange:D.useCallback(I=>{q.current=I},[]),children:g.jsx(K,{...G,children:g.jsx(Qu,{asChild:!0,trapped:o,onMountAutoFocus:Oe(l,I=>{var L;I.preventDefault(),(L=M.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:g.jsx(uc,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:y,onDismiss:S,children:g.jsx(l2,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:i,currentTabStopId:N,onCurrentTabStopIdChange:A,onEntryFocus:Oe(d,I=>{b.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(vh,{role:"menu","aria-orientation":"vertical","data-state":M2(v.open),"data-radix-menu-content":"",dir:b.dir,..._,...w,ref:R,style:{outline:"none",...w.style},onKeyDown:Oe(w.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,H=I.ctrlKey||I.altKey||I.metaKey,F=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!H&&F&&Y(I.key));const J=M.current;if(I.target!==J||!YT.includes(I.key))return;I.preventDefault();const Z=k().filter(W=>!W.disabled).map(W=>W.ref.current);u2.includes(I.key)&&Z.reverse(),v6(Z)}),onBlur:Oe(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),O.current="")}),onPointerMove:Oe(t.onPointerMove,zu(I=>{const L=I.target,z=V.current!==I.clientX;if(I.currentTarget.contains(L)&&z){const H=I.clientX>V.current?"right":"left";$.current=H,V.current=I.clientX}}))})})})})})})});g2.displayName=ii;var l6="MenuGroup",D1=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Ge.div,{role:"group",...i,ref:e})});D1.displayName=l6;var c6="MenuLabel",v2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Ge.div,{...i,ref:e})});v2.displayName=c6;var Ff="MenuItem",fb="menu.itemSelect",xh=D.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:i,...o}=t,l=D.useRef(null),u=rd(Ff,t.__scopeMenu),a=T1(Ff,t.__scopeMenu),d=_t(e,l),f=D.useRef(!1),p=()=>{const h=l.current;if(!n&&h){const y=new CustomEvent(fb,{bubbles:!0,cancelable:!0});h.addEventListener(fb,S=>i==null?void 0:i(S),{once:!0}),eS(h,y),y.defaultPrevented?f.current=!1:u.onClose()}};return g.jsx(_2,{...o,ref:d,disabled:n,onClick:Oe(t.onClick,p),onPointerDown:h=>{var y;(y=t.onPointerDown)==null||y.call(t,h),f.current=!0},onPointerUp:Oe(t.onPointerUp,h=>{var y;f.current||(y=h.currentTarget)==null||y.click()}),onKeyDown:Oe(t.onKeyDown,h=>{const y=a.searchRef.current!=="";n||y&&h.key===" "||jg.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});xh.displayName=Ff;var _2=D.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:i=!1,textValue:o,...l}=t,u=T1(Ff,n),a=f2(n),d=D.useRef(null),f=_t(e,d),[p,h]=D.useState(!1),[y,S]=D.useState("");return D.useEffect(()=>{var w;const C=d.current;C&&S(((w=C.textContent)!=null?w:"").trim())},[l.children]),g.jsx(Bu.ItemSlot,{scope:n,disabled:i,textValue:o!=null?o:y,children:g.jsx(c2,{asChild:!0,...a,focusable:!i,children:g.jsx(Ge.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...l,ref:f,onPointerMove:Oe(t.onPointerMove,zu(C=>{i?u.onItemLeave(C):(u.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(t.onPointerLeave,zu(C=>u.onItemLeave(C))),onFocus:Oe(t.onFocus,()=>h(!0)),onBlur:Oe(t.onBlur,()=>h(!1))})})})}),u6="MenuCheckboxItem",y2=D.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:i,...o}=t;return g.jsx(C2,{scope:t.__scopeMenu,checked:n,children:g.jsx(xh,{role:"menuitemcheckbox","aria-checked":Hf(n)?"mixed":n,...o,ref:e,"data-state":j1(n),onSelect:Oe(o.onSelect,()=>i==null?void 0:i(Hf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});y2.displayName=u6;var b2="MenuRadioGroup",[d6,f6]=Ba(b2,{value:void 0,onValueChange:()=>{}}),x2=D.forwardRef((t,e)=>{const{value:n,onValueChange:i,...o}=t,l=Hn(i);return g.jsx(d6,{scope:t.__scopeMenu,value:n,onValueChange:l,children:g.jsx(D1,{...o,ref:e})})});x2.displayName=b2;var S2="MenuRadioItem",w2=D.forwardRef((t,e)=>{const{value:n,...i}=t,o=f6(S2,t.__scopeMenu),l=n===o.value;return g.jsx(C2,{scope:t.__scopeMenu,checked:l,children:g.jsx(xh,{role:"menuitemradio","aria-checked":l,...i,ref:e,"data-state":j1(l),onSelect:Oe(i.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});w2.displayName=S2;var M1="MenuItemIndicator",[C2,h6]=Ba(M1,{checked:!1}),k2=D.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:i,...o}=t,l=h6(M1,n);return g.jsx(An,{present:i||Hf(l.checked)||l.checked===!0,children:g.jsx(Ge.span,{...o,ref:e,"data-state":j1(l.checked)})})});k2.displayName=M1;var p6="MenuSeparator",E2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(Ge.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});E2.displayName=p6;var m6="MenuArrow",A2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=bh(n);return g.jsx(_h,{...o,...i,ref:e})});A2.displayName=m6;var g6="MenuSub",[PH,R2]=Ba(g6),Au="MenuSubTrigger",T2=D.forwardRef((t,e)=>{const n=za(Au,t.__scopeMenu),i=rd(Au,t.__scopeMenu),o=R2(Au,t.__scopeMenu),l=T1(Au,t.__scopeMenu),u=D.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:d}=l,f={__scopeMenu:t.__scopeMenu},p=D.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return D.useEffect(()=>p,[p]),D.useEffect(()=>{const h=a.current;return()=>{window.clearTimeout(h),d(null)}},[a,d]),g.jsx(A1,{asChild:!0,...f,children:g.jsx(_2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":M2(n.open),...t,ref:Ms(e,o.onTriggerChange),onClick:h=>{var y;(y=t.onClick)==null||y.call(t,h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(t.onPointerMove,zu(h=>{l.onItemEnter(h),!h.defaultPrevented&&!t.disabled&&!n.open&&!u.current&&(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:Oe(t.onPointerLeave,zu(h=>{var S,C;p();const y=(S=n.content)==null?void 0:S.getBoundingClientRect();if(y){const w=(C=n.content)==null?void 0:C.dataset.side,v=w==="right",b=v?-5:5,_=y[v?"left":"right"],x=y[v?"right":"left"];l.onPointerGraceIntentChange({area:[{x:h.clientX+b,y:h.clientY},{x:_,y:y.top},{x,y:y.top},{x,y:y.bottom},{x:_,y:y.bottom}],side:w}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(h),h.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(t.onKeyDown,h=>{var S;const y=l.searchRef.current!=="";t.disabled||y&&h.key===" "||XT[i.dir].includes(h.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),h.preventDefault())})})})});T2.displayName=Au;var N2="MenuSubContent",D2=D.forwardRef((t,e)=>{const n=p2(ii,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=za(ii,t.__scopeMenu),u=rd(ii,t.__scopeMenu),a=R2(N2,t.__scopeMenu),d=D.useRef(null),f=_t(e,d);return g.jsx(Bu.Provider,{scope:t.__scopeMenu,children:g.jsx(An,{present:i||l.open,children:g.jsx(Bu.Slot,{scope:t.__scopeMenu,children:g.jsx(N1,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:f,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var h;u.isUsingKeyboardRef.current&&((h=d.current)==null||h.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Oe(t.onFocusOutside,p=>{p.target!==a.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:Oe(t.onEscapeKeyDown,p=>{u.onClose(),p.preventDefault()}),onKeyDown:Oe(t.onKeyDown,p=>{var S;const h=p.currentTarget.contains(p.target),y=QT[u.dir].includes(p.key);h&&y&&(l.onOpenChange(!1),(S=a.trigger)==null||S.focus(),p.preventDefault())})})})})})});D2.displayName=N2;function M2(t){return t?"open":"closed"}function Hf(t){return t==="indeterminate"}function j1(t){return Hf(t)?"indeterminate":t?"checked":"unchecked"}function v6(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function _6(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function y6(t,e,n){const o=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,l=n?t.indexOf(n):-1;let u=_6(t,Math.max(l,0));o.length===1&&(u=u.filter(f=>f!==n));const d=u.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function b6(t,e){const{x:n,y:i}=t;let o=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const a=e[l],d=e[u],f=a.x,p=a.y,h=d.x,y=d.y;p>i!=y>i&&n<(h-f)*(i-p)/(y-p)+f&&(o=!o)}return o}function x6(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return b6(n,e)}function zu(t){return e=>e.pointerType==="mouse"?t(e):void 0}var S6=h2,w6=A1,C6=m2,k6=g2,E6=D1,A6=v2,R6=xh,T6=y2,N6=x2,D6=w2,M6=k2,j6=E2,O6=A2,L6=T2,I6=D2,Sh="DropdownMenu",[B6]=Hr(Sh,[d2]),or=d2(),[z6,j2]=B6(Sh),O2=t=>{const{__scopeDropdownMenu:e,children:n,dir:i,open:o,defaultOpen:l,onOpenChange:u,modal:a=!0}=t,d=or(e),f=D.useRef(null),[p,h]=js({prop:o,defaultProp:l!=null?l:!1,onChange:u,caller:Sh});return g.jsx(z6,{scope:e,triggerId:wn(),triggerRef:f,contentId:wn(),open:p,onOpenChange:h,onOpenToggle:D.useCallback(()=>h(y=>!y),[h]),modal:a,children:g.jsx(S6,{...d,open:p,onOpenChange:h,dir:i,modal:a,children:n})})};O2.displayName=Sh;var L2="DropdownMenuTrigger",I2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...o}=t,l=j2(L2,n),u=or(n);return g.jsx(w6,{asChild:!0,...u,children:g.jsx(Ge.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...o,ref:Ms(e,l.triggerRef),onPointerDown:Oe(t.onPointerDown,a=>{!i&&a.button===0&&a.ctrlKey===!1&&(l.onOpenToggle(),l.open||a.preventDefault())}),onKeyDown:Oe(t.onKeyDown,a=>{i||(["Enter"," "].includes(a.key)&&l.onOpenToggle(),a.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});I2.displayName=L2;var P6="DropdownMenuPortal",B2=t=>{const{__scopeDropdownMenu:e,...n}=t,i=or(e);return g.jsx(C6,{...i,...n})};B2.displayName=P6;var z2="DropdownMenuContent",P2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=j2(z2,n),l=or(n),u=D.useRef(!1);return g.jsx(k6,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...i,ref:e,onCloseAutoFocus:Oe(t.onCloseAutoFocus,a=>{var d;u.current||(d=o.triggerRef.current)==null||d.focus(),u.current=!1,a.preventDefault()}),onInteractOutside:Oe(t.onInteractOutside,a=>{const d=a.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,p=d.button===2||f;(!o.modal||p)&&(u.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});P2.displayName=z2;var F6="DropdownMenuGroup",H6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(E6,{...o,...i,ref:e})});H6.displayName=F6;var U6="DropdownMenuLabel",$6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(A6,{...o,...i,ref:e})});$6.displayName=U6;var q6="DropdownMenuItem",F2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(R6,{...o,...i,ref:e})});F2.displayName=q6;var V6="DropdownMenuCheckboxItem",W6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(T6,{...o,...i,ref:e})});W6.displayName=V6;var G6="DropdownMenuRadioGroup",K6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(N6,{...o,...i,ref:e})});K6.displayName=G6;var Y6="DropdownMenuRadioItem",X6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(D6,{...o,...i,ref:e})});X6.displayName=Y6;var Q6="DropdownMenuItemIndicator",Z6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(M6,{...o,...i,ref:e})});Z6.displayName=Q6;var J6="DropdownMenuSeparator",eN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(j6,{...o,...i,ref:e})});eN.displayName=J6;var tN="DropdownMenuArrow",nN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(O6,{...o,...i,ref:e})});nN.displayName=tN;var rN="DropdownMenuSubTrigger",iN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(L6,{...o,...i,ref:e})});iN.displayName=rN;var sN="DropdownMenuSubContent",oN=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=or(n);return g.jsx(I6,{...o,...i,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oN.displayName=sN;var aN=O2,lN=I2,cN=B2,uN=P2,dN=F2,fN="Label",H2=D.forwardRef((t,e)=>g.jsx(Ge.label,{...t,ref:e,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=t.onMouseDown)==null||o.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));H2.displayName=fN;var hN=H2;function Og(t,[e,n]){return Math.min(n,Math.max(e,t))}var wh="Popover",[U2]=Hr(wh,[Lo]),id=Lo(),[pN,Io]=U2(wh),$2=t=>{const{__scopePopover:e,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:u=!1}=t,a=id(e),d=D.useRef(null),[f,p]=D.useState(!1),[h,y]=js({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:wh});return g.jsx(gh,{...a,children:g.jsx(pN,{scope:e,contentId:wn(),triggerRef:d,open:h,onOpenChange:y,onOpenToggle:D.useCallback(()=>y(S=>!S),[y]),hasCustomAnchor:f,onCustomAnchorAdd:D.useCallback(()=>p(!0),[]),onCustomAnchorRemove:D.useCallback(()=>p(!1),[]),modal:u,children:n})})};$2.displayName=wh;var q2="PopoverAnchor",V2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Io(q2,n),l=id(n),{onCustomAnchorAdd:u,onCustomAnchorRemove:a}=o;return D.useEffect(()=>(u(),()=>a()),[u,a]),g.jsx(ed,{...l,...i,ref:e})});V2.displayName=q2;var W2="PopoverTrigger",G2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Io(W2,n),l=id(n),u=_t(e,o.triggerRef),a=g.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Z2(o.open),...i,ref:u,onClick:Oe(t.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:g.jsx(ed,{asChild:!0,...l,children:a})});G2.displayName=W2;var O1="PopoverPortal",[mN,gN]=U2(O1,{forceMount:void 0}),K2=t=>{const{__scopePopover:e,forceMount:n,children:i,container:o}=t,l=Io(O1,e);return g.jsx(mN,{scope:e,forceMount:n,children:g.jsx(An,{present:n||l.open,children:g.jsx(dc,{asChild:!0,container:o,children:i})})})};K2.displayName=O1;var ec="PopoverContent",Y2=D.forwardRef((t,e)=>{const n=gN(ec,t.__scopePopover),{forceMount:i=n.forceMount,...o}=t,l=Io(ec,t.__scopePopover);return g.jsx(An,{present:i||l.open,children:l.modal?g.jsx(_N,{...o,ref:e}):g.jsx(yN,{...o,ref:e})})});Y2.displayName=ec;var vN=Ro("PopoverContent.RemoveScroll"),_N=D.forwardRef((t,e)=>{const n=Io(ec,t.__scopePopover),i=D.useRef(null),o=_t(e,i),l=D.useRef(!1);return D.useEffect(()=>{const u=i.current;if(u)return ch(u)},[]),g.jsx(Zu,{as:vN,allowPinchZoom:!0,children:g.jsx(X2,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(t.onCloseAutoFocus,u=>{var a;u.preventDefault(),l.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Oe(t.onPointerDownOutside,u=>{const a=u.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,f=a.button===2||d;l.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Oe(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),yN=D.forwardRef((t,e)=>{const n=Io(ec,t.__scopePopover),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(X2,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var u,a;(u=t.onCloseAutoFocus)==null||u.call(t,l),l.defaultPrevented||(i.current||(a=n.triggerRef.current)==null||a.focus(),l.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:l=>{var d,f;(d=t.onInteractOutside)==null||d.call(t,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(u))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),X2=D.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,...h}=t,y=Io(ec,n),S=id(n);return ah(),g.jsx(Qu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:g.jsx(uc,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:p,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:f,onDismiss:()=>y.onOpenChange(!1),children:g.jsx(vh,{"data-state":Z2(y.open),role:"dialog",id:y.contentId,...S,...h,ref:e,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Q2="PopoverClose",bN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Io(Q2,n);return g.jsx(Ge.button,{type:"button",...i,ref:e,onClick:Oe(t.onClick,()=>o.onOpenChange(!1))})});bN.displayName=Q2;var xN="PopoverArrow",SN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=id(n);return g.jsx(_h,{...o,...i,ref:e})});SN.displayName=xN;function Z2(t){return t?"open":"closed"}var wN=$2,CN=V2,kN=G2,EN=K2,AN=Y2,L1="Progress",I1=100,[RN]=Hr(L1),[TN,NN]=RN(L1),J2=D.forwardRef((t,e)=>{const{__scopeProgress:n,value:i=null,max:o,getValueLabel:l=DN,...u}=t;(o||o===0)&&!hb(o)&&console.error(MN(`${o}`,"Progress"));const a=hb(o)?o:I1;i!==null&&!pb(i,a)&&console.error(jN(`${i}`,"Progress"));const d=pb(i,a)?i:null,f=Uf(d)?l(d,a):void 0;return g.jsx(TN,{scope:n,value:d,max:a,children:g.jsx(Ge.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Uf(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":nw(d,a),"data-value":d!=null?d:void 0,"data-max":a,...u,ref:e})})});J2.displayName=L1;var ew="ProgressIndicator",tw=D.forwardRef((t,e)=>{var l;const{__scopeProgress:n,...i}=t,o=NN(ew,n);return g.jsx(Ge.div,{"data-state":nw(o.value,o.max),"data-value":(l=o.value)!=null?l:void 0,"data-max":o.max,...i,ref:e})});tw.displayName=ew;function DN(t,e){return`${Math.round(t/e*100)}%`}function nw(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Uf(t){return typeof t=="number"}function hb(t){return Uf(t)&&!isNaN(t)&&t>0}function pb(t,e){return Uf(t)&&!isNaN(t)&&t<=e&&t>=0}function MN(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${I1}\`.`}function jN(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
502
|
+
- a positive number
|
|
503
|
+
- less than the value passed to \`max\` (or ${I1} if no \`max\` prop is set)
|
|
504
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
505
|
+
|
|
506
|
+
Defaulting to \`null\`.`}var ON=J2,LN=tw;function IN(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var B1="ScrollArea",[rw]=Hr(B1),[BN,si]=rw(B1),iw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:i="hover",dir:o,scrollHideDelay:l=600,...u}=t,[a,d]=D.useState(null),[f,p]=D.useState(null),[h,y]=D.useState(null),[S,C]=D.useState(null),[w,v]=D.useState(null),[b,_]=D.useState(0),[x,k]=D.useState(0),[N,A]=D.useState(!1),[M,R]=D.useState(!1),j=_t(e,B=>d(B)),O=Xu(o);return g.jsx(BN,{scope:n,type:i,dir:O,scrollHideDelay:l,scrollArea:a,viewport:f,onViewportChange:p,content:h,onContentChange:y,scrollbarX:S,onScrollbarXChange:C,scrollbarXEnabled:N,onScrollbarXEnabledChange:A,scrollbarY:w,onScrollbarYChange:v,scrollbarYEnabled:M,onScrollbarYEnabledChange:R,onCornerWidthChange:_,onCornerHeightChange:k,children:g.jsx(Ge.div,{dir:O,...u,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});iw.displayName=B1;var sw="ScrollAreaViewport",ow=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:i,nonce:o,...l}=t,u=si(sw,n),a=D.useRef(null),d=_t(e,a,u.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),g.jsx(Ge.div,{"data-radix-scroll-area-viewport":"",...l,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...t.style},children:g.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});ow.displayName=sw;var Qi="ScrollAreaScrollbar",aw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=si(Qi,t.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:u}=o,a=t.orientation==="horizontal";return D.useEffect(()=>(a?l(!0):u(!0),()=>{a?l(!1):u(!1)}),[a,l,u]),o.type==="hover"?g.jsx(zN,{...i,ref:e,forceMount:n}):o.type==="scroll"?g.jsx(PN,{...i,ref:e,forceMount:n}):o.type==="auto"?g.jsx(lw,{...i,ref:e,forceMount:n}):o.type==="always"?g.jsx(z1,{...i,ref:e}):null});aw.displayName=Qi;var zN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=si(Qi,t.__scopeScrollArea),[l,u]=D.useState(!1);return D.useEffect(()=>{const a=o.scrollArea;let d=0;if(a){const f=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",f),a.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),a.removeEventListener("pointerenter",f),a.removeEventListener("pointerleave",p)}}},[o.scrollArea,o.scrollHideDelay]),g.jsx(An,{present:n||l,children:g.jsx(lw,{"data-state":l?"visible":"hidden",...i,ref:e})})}),PN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=si(Qi,t.__scopeScrollArea),l=t.orientation==="horizontal",u=kh(()=>d("SCROLL_END"),100),[a,d]=IN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return D.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,o.scrollHideDelay,d]),D.useEffect(()=>{const f=o.viewport,p=l?"scrollLeft":"scrollTop";if(f){let h=f[p];const y=()=>{const S=f[p];h!==S&&(d("SCROLL"),u()),h=S};return f.addEventListener("scroll",y),()=>f.removeEventListener("scroll",y)}},[o.viewport,l,d,u]),g.jsx(An,{present:n||a!=="hidden",children:g.jsx(z1,{"data-state":a==="hidden"?"hidden":"visible",...i,ref:e,onPointerEnter:Oe(t.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Oe(t.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),lw=D.forwardRef((t,e)=>{const n=si(Qi,t.__scopeScrollArea),{forceMount:i,...o}=t,[l,u]=D.useState(!1),a=t.orientation==="horizontal",d=kh(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(a?f:p)}},10);return tc(n.viewport,d),tc(n.content,d),g.jsx(An,{present:i||l,children:g.jsx(z1,{"data-state":l?"visible":"hidden",...o,ref:e})})}),z1=D.forwardRef((t,e)=>{const{orientation:n="vertical",...i}=t,o=si(Qi,t.__scopeScrollArea),l=D.useRef(null),u=D.useRef(0),[a,d]=D.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=hw(a.viewport,a.content),p={...i,sizes:a,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:y=>l.current=y,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:y=>u.current=y};function h(y,S){return VN(y,u.current,a,S)}return n==="horizontal"?g.jsx(FN,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const y=o.viewport.scrollLeft,S=mb(y,a,o.dir);l.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:y=>{o.viewport&&(o.viewport.scrollLeft=y)},onDragScroll:y=>{o.viewport&&(o.viewport.scrollLeft=h(y,o.dir))}}):n==="vertical"?g.jsx(HN,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const y=o.viewport.scrollTop,S=mb(y,a);l.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:y=>{o.viewport&&(o.viewport.scrollTop=y)},onDragScroll:y=>{o.viewport&&(o.viewport.scrollTop=h(y))}}):null}),FN=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=si(Qi,t.__scopeScrollArea),[u,a]=D.useState(),d=D.useRef(null),f=_t(e,d,l.onScrollbarXChange);return D.useEffect(()=>{d.current&&a(getComputedStyle(d.current))},[d]),g.jsx(uw,{"data-orientation":"horizontal",...o,ref:f,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ch(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.x),onDragScroll:p=>t.onDragScroll(p.x),onWheelScroll:(p,h)=>{if(l.viewport){const y=l.viewport.scrollLeft+p.deltaX;t.onWheelScroll(y),mw(y,h)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&u&&i({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:qf(u.paddingLeft),paddingEnd:qf(u.paddingRight)}})}})}),HN=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=si(Qi,t.__scopeScrollArea),[u,a]=D.useState(),d=D.useRef(null),f=_t(e,d,l.onScrollbarYChange);return D.useEffect(()=>{d.current&&a(getComputedStyle(d.current))},[d]),g.jsx(uw,{"data-orientation":"vertical",...o,ref:f,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ch(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.y),onDragScroll:p=>t.onDragScroll(p.y),onWheelScroll:(p,h)=>{if(l.viewport){const y=l.viewport.scrollTop+p.deltaY;t.onWheelScroll(y),mw(y,h)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&u&&i({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:qf(u.paddingTop),paddingEnd:qf(u.paddingBottom)}})}})}),[UN,cw]=rw(Qi),uw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:o,onThumbChange:l,onThumbPointerUp:u,onThumbPointerDown:a,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:p,onResize:h,...y}=t,S=si(Qi,n),[C,w]=D.useState(null),v=_t(e,j=>w(j)),b=D.useRef(null),_=D.useRef(""),x=S.viewport,k=i.content-i.viewport,N=Hn(p),A=Hn(d),M=kh(h,10);function R(j){if(b.current){const O=j.clientX-b.current.left,B=j.clientY-b.current.top;f({x:O,y:B})}}return D.useEffect(()=>{const j=O=>{const B=O.target;(C==null?void 0:C.contains(B))&&N(O,k)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[x,C,k,N]),D.useEffect(A,[i,A]),tc(C,M),tc(S.content,M),g.jsx(UN,{scope:n,scrollbar:C,hasThumb:o,onThumbChange:Hn(l),onThumbPointerUp:Hn(u),onThumbPositionChange:A,onThumbPointerDown:Hn(a),children:g.jsx(Ge.div,{...y,ref:v,style:{position:"absolute",...y.style},onPointerDown:Oe(t.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),b.current=C.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),R(j))}),onPointerMove:Oe(t.onPointerMove,R),onPointerUp:Oe(t.onPointerUp,j=>{const O=j.target;O.hasPointerCapture(j.pointerId)&&O.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=_.current,S.viewport&&(S.viewport.style.scrollBehavior=""),b.current=null})})})}),$f="ScrollAreaThumb",dw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=cw($f,t.__scopeScrollArea);return g.jsx(An,{present:n||o.hasThumb,children:g.jsx($N,{ref:e,...i})})}),$N=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:i,...o}=t,l=si($f,n),u=cw($f,n),{onThumbPositionChange:a}=u,d=_t(e,h=>u.onThumbChange(h)),f=D.useRef(void 0),p=kh(()=>{f.current&&(f.current(),f.current=void 0)},100);return D.useEffect(()=>{const h=l.viewport;if(h){const y=()=>{if(p(),!f.current){const S=WN(h,a);f.current=S,a()}};return a(),h.addEventListener("scroll",y),()=>h.removeEventListener("scroll",y)}},[l.viewport,p,a]),g.jsx(Ge.div,{"data-state":u.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Oe(t.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),C=h.clientX-S.left,w=h.clientY-S.top;u.onThumbPointerDown({x:C,y:w})}),onPointerUp:Oe(t.onPointerUp,u.onThumbPointerUp)})});dw.displayName=$f;var P1="ScrollAreaCorner",fw=D.forwardRef((t,e)=>{const n=si(P1,t.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?g.jsx(qN,{...t,ref:e}):null});fw.displayName=P1;var qN=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,...i}=t,o=si(P1,n),[l,u]=D.useState(0),[a,d]=D.useState(0),f=!!(l&&a);return tc(o.scrollbarX,()=>{var h;const p=((h=o.scrollbarX)==null?void 0:h.offsetHeight)||0;o.onCornerHeightChange(p),d(p)}),tc(o.scrollbarY,()=>{var h;const p=((h=o.scrollbarY)==null?void 0:h.offsetWidth)||0;o.onCornerWidthChange(p),u(p)}),f?g.jsx(Ge.div,{...i,ref:e,style:{width:l,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function qf(t){return t?parseInt(t,10):0}function hw(t,e){const n=t/e;return isNaN(n)?0:n}function Ch(t){const e=hw(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-n)*e;return Math.max(i,18)}function VN(t,e,n,i="ltr"){const o=Ch(n),l=o/2,u=e||l,a=o-u,d=n.scrollbar.paddingStart+u,f=n.scrollbar.size-n.scrollbar.paddingEnd-a,p=n.content-n.viewport,h=i==="ltr"?[0,p]:[p*-1,0];return pw([d,f],h)(t)}function mb(t,e,n="ltr"){const i=Ch(e),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=e.scrollbar.size-o,u=e.content-e.viewport,a=l-i,d=n==="ltr"?[0,u]:[u*-1,0],f=Og(t,d);return pw([0,u],[0,a])(f)}function pw(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const i=(e[1]-e[0])/(t[1]-t[0]);return e[0]+i*(n-t[0])}}function mw(t,e){return t>0&&t<e}var WN=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},i=0;return(function o(){const l={left:t.scrollLeft,top:t.scrollTop},u=n.left!==l.left,a=n.top!==l.top;(u||a)&&e(),n=l,i=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(i)};function kh(t,e){const n=Hn(t),i=D.useRef(0);return D.useEffect(()=>()=>window.clearTimeout(i.current),[]),D.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,e)},[n,e])}function tc(t,e){const n=Hn(e);En(()=>{let i=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return o.observe(t),()=>{window.cancelAnimationFrame(i),o.unobserve(t)}}},[t,n])}var GN=iw,KN=ow,YN=fw,XN=[" ","Enter","ArrowUp","ArrowDown"],QN=[" ","Enter"],ja="Select",[Eh,Ah,ZN]=l1(ja),[pc]=Hr(ja,[ZN,Lo]),Rh=Lo(),[JN,Bo]=pc(ja),[eD,tD]=pc(ja),gw=t=>{const{__scopeSelect:e,children:n,open:i,defaultOpen:o,onOpenChange:l,value:u,defaultValue:a,onValueChange:d,dir:f,name:p,autoComplete:h,disabled:y,required:S,form:C}=t,w=Rh(e),[v,b]=D.useState(null),[_,x]=D.useState(null),[k,N]=D.useState(!1),A=Xu(f),[M,R]=js({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:ja}),[j,O]=js({prop:u,defaultProp:a,onChange:d,caller:ja}),B=D.useRef(null),q=v?C||!!v.closest("form"):!0,[$,V]=D.useState(new Set),K=Array.from($).map(G=>G.props.value).join(";");return g.jsx(gh,{...w,children:g.jsxs(JN,{required:S,scope:e,trigger:v,onTriggerChange:b,valueNode:_,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:wn(),value:j,onValueChange:O,open:M,onOpenChange:R,dir:A,triggerPointerDownPosRef:B,disabled:y,children:[g.jsx(Eh.Provider,{scope:e,children:g.jsx(eD,{scope:t.__scopeSelect,onNativeOptionAdd:D.useCallback(G=>{V(Y=>new Set(Y).add(G))},[]),onNativeOptionRemove:D.useCallback(G=>{V(Y=>{const Q=new Set(Y);return Q.delete(G),Q})},[]),children:n})}),q?g.jsxs(Fw,{"aria-hidden":!0,required:S,tabIndex:-1,name:p,autoComplete:h,value:j,onChange:G=>O(G.target.value),disabled:y,form:C,children:[j===void 0?g.jsx("option",{value:""}):null,Array.from($)]},K):null]})})};gw.displayName=ja;var vw="SelectTrigger",_w=D.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:i=!1,...o}=t,l=Rh(n),u=Bo(vw,n),a=u.disabled||i,d=_t(e,u.onTriggerChange),f=Ah(n),p=D.useRef("touch"),[h,y,S]=Uw(w=>{const v=f().filter(x=>!x.disabled),b=v.find(x=>x.value===u.value),_=$w(v,w,b);_!==void 0&&u.onValueChange(_.value)}),C=w=>{a||(u.onOpenChange(!0),S()),w&&(u.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return g.jsx(ed,{asChild:!0,...l,children:g.jsx(Ge.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Hw(u.value)?"":void 0,...o,ref:d,onClick:Oe(o.onClick,w=>{w.currentTarget.focus(),p.current!=="mouse"&&C(w)}),onPointerDown:Oe(o.onPointerDown,w=>{p.current=w.pointerType;const v=w.target;v.hasPointerCapture(w.pointerId)&&v.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(C(w),w.preventDefault())}),onKeyDown:Oe(o.onKeyDown,w=>{const v=h.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&y(w.key),!(v&&w.key===" ")&&XN.includes(w.key)&&(C(),w.preventDefault())})})})});_w.displayName=vw;var yw="SelectValue",bw=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,children:l,placeholder:u="",...a}=t,d=Bo(yw,n),{onValueNodeHasChildrenChange:f}=d,p=l!==void 0,h=_t(e,d.onValueNodeChange);return En(()=>{f(p)},[f,p]),g.jsx(Ge.span,{...a,ref:h,style:{pointerEvents:"none"},children:Hw(d.value)?g.jsx(g.Fragment,{children:u}):l})});bw.displayName=yw;var nD="SelectIcon",xw=D.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,...o}=t;return g.jsx(Ge.span,{"aria-hidden":!0,...o,ref:e,children:i||"▼"})});xw.displayName=nD;var rD="SelectPortal",Sw=t=>g.jsx(dc,{asChild:!0,...t});Sw.displayName=rD;var Oa="SelectContent",ww=D.forwardRef((t,e)=>{const n=Bo(Oa,t.__scopeSelect),[i,o]=D.useState();if(En(()=>{o(new DocumentFragment)},[]),!n.open){const l=i;return l?Ku.createPortal(g.jsx(Cw,{scope:t.__scopeSelect,children:g.jsx(Eh.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),l):null}return g.jsx(kw,{...t,ref:e})});ww.displayName=Oa;var wi=10,[Cw,zo]=pc(Oa),iD="SelectContentImpl",sD=Ro("SelectContent.RemoveScroll"),kw=D.forwardRef((t,e)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:u,side:a,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:v,...b}=t,_=Bo(Oa,n),[x,k]=D.useState(null),[N,A]=D.useState(null),M=_t(e,W=>k(W)),[R,j]=D.useState(null),[O,B]=D.useState(null),q=Ah(n),[$,V]=D.useState(!1),K=D.useRef(!1);D.useEffect(()=>{if(x)return ch(x)},[x]),ah();const G=D.useCallback(W=>{const[U,...te]=q().map(se=>se.ref.current),[ie]=te.slice(-1),ae=document.activeElement;for(const se of W)if(se===ae||(se==null||se.scrollIntoView({block:"nearest"}),se===U&&N&&(N.scrollTop=0),se===ie&&N&&(N.scrollTop=N.scrollHeight),se==null||se.focus(),document.activeElement!==ae))return},[q,N]),Y=D.useCallback(()=>G([R,x]),[G,R,x]);D.useEffect(()=>{$&&Y()},[$,Y]);const{onOpenChange:Q,triggerPointerDownPosRef:I}=_;D.useEffect(()=>{if(x){let W={x:0,y:0};const U=ie=>{var ae,se,_e,Te;W={x:Math.abs(Math.round(ie.pageX)-((se=(ae=I.current)==null?void 0:ae.x)!=null?se:0)),y:Math.abs(Math.round(ie.pageY)-((Te=(_e=I.current)==null?void 0:_e.y)!=null?Te:0))}},te=ie=>{W.x<=10&&W.y<=10?ie.preventDefault():x.contains(ie.target)||Q(!1),document.removeEventListener("pointermove",U),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",te,{capture:!0})}}},[x,Q,I]),D.useEffect(()=>{const W=()=>Q(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[Q]);const[L,z]=Uw(W=>{const U=q().filter(ae=>!ae.disabled),te=U.find(ae=>ae.ref.current===document.activeElement),ie=$w(U,W,te);ie&&setTimeout(()=>ie.ref.current.focus())}),H=D.useCallback((W,U,te)=>{const ie=!K.current&&!te;(_.value!==void 0&&_.value===U||ie)&&(j(W),ie&&(K.current=!0))},[_.value]),F=D.useCallback(()=>x==null?void 0:x.focus(),[x]),J=D.useCallback((W,U,te)=>{const ie=!K.current&&!te;(_.value!==void 0&&_.value===U||ie)&&B(W)},[_.value]),ne=i==="popper"?Lg:Ew,Z=ne===Lg?{side:a,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:v}:{};return g.jsx(Cw,{scope:n,content:x,viewport:N,onViewportChange:A,itemRefCallback:H,selectedItem:R,onItemLeave:F,itemTextRefCallback:J,focusSelectedItem:Y,selectedItemText:O,position:i,isPositioned:$,searchRef:L,children:g.jsx(Zu,{as:sD,allowPinchZoom:!0,children:g.jsx(Qu,{asChild:!0,trapped:_.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Oe(o,W=>{var U;(U=_.trigger)==null||U.focus({preventScroll:!0}),W.preventDefault()}),children:g.jsx(uc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:g.jsx(ne,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:W=>W.preventDefault(),...b,...Z,onPlaced:()=>V(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Oe(b.onKeyDown,W=>{const U=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!U&&W.key.length===1&&z(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let ie=q().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(W.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ae=W.target,se=ie.indexOf(ae);ie=ie.slice(se+1)}setTimeout(()=>G(ie)),W.preventDefault()}})})})})})})});kw.displayName=iD;var oD="SelectItemAlignedPosition",Ew=D.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:i,...o}=t,l=Bo(Oa,n),u=zo(Oa,n),[a,d]=D.useState(null),[f,p]=D.useState(null),h=_t(e,M=>p(M)),y=Ah(n),S=D.useRef(!1),C=D.useRef(!0),{viewport:w,selectedItem:v,selectedItemText:b,focusSelectedItem:_}=u,x=D.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&f&&w&&v&&b){const M=l.trigger.getBoundingClientRect(),R=f.getBoundingClientRect(),j=l.valueNode.getBoundingClientRect(),O=b.getBoundingClientRect();if(l.dir!=="rtl"){const ae=O.left-R.left,se=j.left-ae,_e=M.left-se,Te=M.width+_e,De=Math.max(Te,R.width),Ke=window.innerWidth-wi,Ae=Og(se,[wi,Math.max(wi,Ke-De)]);a.style.minWidth=Te+"px",a.style.left=Ae+"px"}else{const ae=R.right-O.right,se=window.innerWidth-j.right-ae,_e=window.innerWidth-M.right-se,Te=M.width+_e,De=Math.max(Te,R.width),Ke=window.innerWidth-wi,Ae=Og(se,[wi,Math.max(wi,Ke-De)]);a.style.minWidth=Te+"px",a.style.right=Ae+"px"}const B=y(),q=window.innerHeight-wi*2,$=w.scrollHeight,V=window.getComputedStyle(f),K=parseInt(V.borderTopWidth,10),G=parseInt(V.paddingTop,10),Y=parseInt(V.borderBottomWidth,10),Q=parseInt(V.paddingBottom,10),I=K+G+$+Q+Y,L=Math.min(v.offsetHeight*5,I),z=window.getComputedStyle(w),H=parseInt(z.paddingTop,10),F=parseInt(z.paddingBottom,10),J=M.top+M.height/2-wi,ne=q-J,Z=v.offsetHeight/2,W=v.offsetTop+Z,U=K+G+W,te=I-U;if(U<=J){const ae=B.length>0&&v===B[B.length-1].ref.current;a.style.bottom="0px";const se=f.clientHeight-w.offsetTop-w.offsetHeight,_e=Math.max(ne,Z+(ae?F:0)+se+Y),Te=U+_e;a.style.height=Te+"px"}else{const ae=B.length>0&&v===B[0].ref.current;a.style.top="0px";const _e=Math.max(J,K+w.offsetTop+(ae?H:0)+Z)+te;a.style.height=_e+"px",w.scrollTop=U-J+w.offsetTop}a.style.margin=`${wi}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=q+"px",i==null||i(),requestAnimationFrame(()=>S.current=!0)}},[y,l.trigger,l.valueNode,a,f,w,v,b,l.dir,i]);En(()=>x(),[x]);const[k,N]=D.useState();En(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const A=D.useCallback(M=>{M&&C.current===!0&&(x(),_==null||_(),C.current=!1)},[x,_]);return g.jsx(lD,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:S,onScrollButtonChange:A,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:g.jsx(Ge.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ew.displayName=oD;var aD="SelectPopperPosition",Lg=D.forwardRef((t,e)=>{const{__scopeSelect:n,align:i="start",collisionPadding:o=wi,...l}=t,u=Rh(n);return g.jsx(vh,{...u,...l,ref:e,align:i,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Lg.displayName=aD;var[lD,F1]=pc(Oa,{}),Ig="SelectViewport",Aw=D.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:i,...o}=t,l=zo(Ig,n),u=F1(Ig,n),a=_t(e,l.onViewportChange),d=D.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),g.jsx(Eh.Slot,{scope:n,children:g.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Oe(o.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:y}=u;if(y!=null&&y.current&&h){const S=Math.abs(d.current-p.scrollTop);if(S>0){const C=window.innerHeight-wi*2,w=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),b=Math.max(w,v);if(b<C){const _=b+S,x=Math.min(C,_),k=_-x;h.style.height=x+"px",h.style.bottom==="0px"&&(p.scrollTop=k>0?k:0,h.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});Aw.displayName=Ig;var Rw="SelectGroup",[cD,uD]=pc(Rw),Tw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=wn();return g.jsx(cD,{scope:n,id:o,children:g.jsx(Ge.div,{role:"group","aria-labelledby":o,...i,ref:e})})});Tw.displayName=Rw;var Nw="SelectLabel",Dw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=uD(Nw,n);return g.jsx(Ge.div,{id:o.id,...i,ref:e})});Dw.displayName=Nw;var Vf="SelectItem",[dD,Mw]=pc(Vf),jw=D.forwardRef((t,e)=>{const{__scopeSelect:n,value:i,disabled:o=!1,textValue:l,...u}=t,a=Bo(Vf,n),d=zo(Vf,n),f=a.value===i,[p,h]=D.useState(l!=null?l:""),[y,S]=D.useState(!1),C=_t(e,_=>{var x;return(x=d.itemRefCallback)==null?void 0:x.call(d,_,i,o)}),w=wn(),v=D.useRef("touch"),b=()=>{o||(a.onValueChange(i),a.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(dD,{scope:n,value:i,disabled:o,textId:w,isSelected:f,onItemTextChange:D.useCallback(_=>{h(x=>{var k;return x||((k=_==null?void 0:_.textContent)!=null?k:"").trim()})},[]),children:g.jsx(Eh.ItemSlot,{scope:n,value:i,disabled:o,textValue:p,children:g.jsx(Ge.div,{role:"option","aria-labelledby":w,"data-highlighted":y?"":void 0,"aria-selected":f&&y,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:C,onFocus:Oe(u.onFocus,()=>S(!0)),onBlur:Oe(u.onBlur,()=>S(!1)),onClick:Oe(u.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:Oe(u.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:Oe(u.onPointerDown,_=>{v.current=_.pointerType}),onPointerMove:Oe(u.onPointerMove,_=>{var x;v.current=_.pointerType,o?(x=d.onItemLeave)==null||x.call(d):v.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(u.onPointerLeave,_=>{var x;_.currentTarget===document.activeElement&&((x=d.onItemLeave)==null||x.call(d))}),onKeyDown:Oe(u.onKeyDown,_=>{var k;((k=d.searchRef)==null?void 0:k.current)!==""&&_.key===" "||(QN.includes(_.key)&&b(),_.key===" "&&_.preventDefault())})})})})});jw.displayName=Vf;var Ru="SelectItemText",Ow=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,...l}=t,u=Bo(Ru,n),a=zo(Ru,n),d=Mw(Ru,n),f=tD(Ru,n),[p,h]=D.useState(null),y=_t(e,b=>h(b),d.onItemTextChange,b=>{var _;return(_=a.itemTextRefCallback)==null?void 0:_.call(a,b,d.value,d.disabled)}),S=p==null?void 0:p.textContent,C=D.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:S},d.value),[d.disabled,d.value,S]),{onNativeOptionAdd:w,onNativeOptionRemove:v}=f;return En(()=>(w(C),()=>v(C)),[w,v,C]),g.jsxs(g.Fragment,{children:[g.jsx(Ge.span,{id:d.textId,...l,ref:y}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Ku.createPortal(l.children,u.valueNode):null]})});Ow.displayName=Ru;var Lw="SelectItemIndicator",Iw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return Mw(Lw,n).isSelected?g.jsx(Ge.span,{"aria-hidden":!0,...i,ref:e}):null});Iw.displayName=Lw;var Bg="SelectScrollUpButton",Bw=D.forwardRef((t,e)=>{const n=zo(Bg,t.__scopeSelect),i=F1(Bg,t.__scopeSelect),[o,l]=D.useState(!1),u=_t(e,i.onScrollButtonChange);return En(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=d.scrollTop>0;l(f)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(Pw,{...t,ref:u,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop-d.offsetHeight)}}):null});Bw.displayName=Bg;var zg="SelectScrollDownButton",zw=D.forwardRef((t,e)=>{const n=zo(zg,t.__scopeSelect),i=F1(zg,t.__scopeSelect),[o,l]=D.useState(!1),u=_t(e,i.onScrollButtonChange);return En(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<f;l(p)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(Pw,{...t,ref:u,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop+d.offsetHeight)}}):null});zw.displayName=zg;var Pw=D.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:i,...o}=t,l=zo("SelectScrollButton",n),u=D.useRef(null),a=Ah(n),d=D.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return D.useEffect(()=>()=>d(),[d]),En(()=>{var p;const f=a().find(h=>h.ref.current===document.activeElement);(p=f==null?void 0:f.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),g.jsx(Ge.div,{"aria-hidden":!0,...o,ref:e,style:{flexShrink:0,...o.style},onPointerDown:Oe(o.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:Oe(o.onPointerMove,()=>{var f;(f=l.onItemLeave)==null||f.call(l),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:Oe(o.onPointerLeave,()=>{d()})})}),fD="SelectSeparator",hD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return g.jsx(Ge.div,{"aria-hidden":!0,...i,ref:e})});hD.displayName=fD;var Pg="SelectArrow",pD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=Rh(n),l=Bo(Pg,n),u=zo(Pg,n);return l.open&&u.position==="popper"?g.jsx(_h,{...o,...i,ref:e}):null});pD.displayName=Pg;var mD="SelectBubbleInput",Fw=D.forwardRef(({__scopeSelect:t,value:e,...n},i)=>{const o=D.useRef(null),l=_t(i,o),u=CR(e);return D.useEffect(()=>{const a=o.current;if(!a)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==e&&p){const h=new Event("change",{bubbles:!0});p.call(a,e),a.dispatchEvent(h)}},[u,e]),g.jsx(Ge.select,{...n,style:{...tS,...n.style},ref:l,defaultValue:e})});Fw.displayName=mD;function Hw(t){return t===""||t===void 0}function Uw(t){const e=Hn(t),n=D.useRef(""),i=D.useRef(0),o=D.useCallback(u=>{const a=n.current+u;e(a),(function d(f){n.current=f,window.clearTimeout(i.current),f!==""&&(i.current=window.setTimeout(()=>d(""),1e3))})(a)},[e]),l=D.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,o,l]}function $w(t,e,n){const o=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,l=n?t.indexOf(n):-1;let u=gD(t,Math.max(l,0));o.length===1&&(u=u.filter(f=>f!==n));const d=u.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function gD(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var vD=gw,_D=_w,yD=bw,bD=xw,xD=Sw,SD=ww,wD=Aw,CD=Tw,kD=Dw,ED=jw,AD=Ow,RD=Iw,TD=Bw,ND=zw,DD="Separator",gb="horizontal",MD=["horizontal","vertical"],qw=D.forwardRef((t,e)=>{const{decorative:n,orientation:i=gb,...o}=t,l=jD(i)?i:gb,a=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return g.jsx(Ge.div,{"data-orientation":l,...a,...o,ref:e})});qw.displayName=DD;function jD(t){return MD.includes(t)}var OD=qw,Th="Tabs",[LD]=Hr(Th,[yh]),Vw=yh(),[ID,H1]=LD(Th),Ww=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,onValueChange:o,defaultValue:l,orientation:u="horizontal",dir:a,activationMode:d="automatic",...f}=t,p=Xu(a),[h,y]=js({prop:i,onChange:o,defaultProp:l!=null?l:"",caller:Th});return g.jsx(ID,{scope:n,baseId:wn(),value:h,onValueChange:y,orientation:u,dir:p,activationMode:d,children:g.jsx(Ge.div,{dir:p,"data-orientation":u,...f,ref:e})})});Ww.displayName=Th;var Gw="TabsList",Kw=D.forwardRef((t,e)=>{const{__scopeTabs:n,loop:i=!0,...o}=t,l=H1(Gw,n),u=Vw(n);return g.jsx(l2,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:i,children:g.jsx(Ge.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:e})})});Kw.displayName=Gw;var Yw="TabsTrigger",Xw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,disabled:o=!1,...l}=t,u=H1(Yw,n),a=Vw(n),d=Jw(u.baseId,i),f=eC(u.baseId,i),p=i===u.value;return g.jsx(c2,{asChild:!0,...a,focusable:!o,active:p,children:g.jsx(Ge.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:d,...l,ref:e,onMouseDown:Oe(t.onMouseDown,h=>{!o&&h.button===0&&h.ctrlKey===!1?u.onValueChange(i):h.preventDefault()}),onKeyDown:Oe(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&u.onValueChange(i)}),onFocus:Oe(t.onFocus,()=>{const h=u.activationMode!=="manual";!p&&!o&&h&&u.onValueChange(i)})})})});Xw.displayName=Yw;var Qw="TabsContent",Zw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,forceMount:o,children:l,...u}=t,a=H1(Qw,n),d=Jw(a.baseId,i),f=eC(a.baseId,i),p=i===a.value,h=D.useRef(p);return D.useEffect(()=>{const y=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(y)},[]),g.jsx(An,{present:o||p,children:({present:y})=>g.jsx(Ge.div,{"data-state":p?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":d,hidden:!y,id:f,tabIndex:0,...u,ref:e,style:{...t.style,animationDuration:h.current?"0s":void 0},children:y&&l})})});Zw.displayName=Qw;function Jw(t,e){return`${t}-trigger-${e}`}function eC(t,e){return`${t}-content-${e}`}var BD=Ww,zD=Kw,PD=Xw,FD=Zw,[Nh]=Hr("Tooltip",[Lo]),Dh=Lo(),tC="TooltipProvider",HD=700,Fg="tooltip.open",[UD,U1]=Nh(tC),nC=t=>{const{__scopeTooltip:e,delayDuration:n=HD,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:l}=t,u=D.useRef(!0),a=D.useRef(!1),d=D.useRef(0);return D.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),g.jsx(UD,{scope:e,isOpenDelayedRef:u,delayDuration:n,onOpen:D.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:D.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:D.useCallback(f=>{a.current=f},[]),disableHoverableContent:o,children:l})};nC.displayName=tC;var Pu="Tooltip",[$D,sd]=Nh(Pu),rC=t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:o,onOpenChange:l,disableHoverableContent:u,delayDuration:a}=t,d=U1(Pu,t.__scopeTooltip),f=Dh(e),[p,h]=D.useState(null),y=wn(),S=D.useRef(0),C=u!=null?u:d.disableHoverableContent,w=a!=null?a:d.delayDuration,v=D.useRef(!1),[b,_]=js({prop:i,defaultProp:o!=null?o:!1,onChange:M=>{M?(d.onOpen(),document.dispatchEvent(new CustomEvent(Fg))):d.onClose(),l==null||l(M)},caller:Pu}),x=D.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),k=D.useCallback(()=>{window.clearTimeout(S.current),S.current=0,v.current=!1,_(!0)},[_]),N=D.useCallback(()=>{window.clearTimeout(S.current),S.current=0,_(!1)},[_]),A=D.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{v.current=!0,_(!0),S.current=0},w)},[w,_]);return D.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),g.jsx(gh,{...f,children:g.jsx($D,{scope:e,contentId:y,open:b,stateAttribute:x,trigger:p,onTriggerChange:h,onTriggerEnter:D.useCallback(()=>{d.isOpenDelayedRef.current?A():k()},[d.isOpenDelayedRef,A,k]),onTriggerLeave:D.useCallback(()=>{C?N():(window.clearTimeout(S.current),S.current=0)},[N,C]),onOpen:k,onClose:N,disableHoverableContent:C,children:n})})};rC.displayName=Pu;var Hg="TooltipTrigger",iC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=sd(Hg,n),l=U1(Hg,n),u=Dh(n),a=D.useRef(null),d=_t(e,a,o.onTriggerChange),f=D.useRef(!1),p=D.useRef(!1),h=D.useCallback(()=>f.current=!1,[]);return D.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(ed,{asChild:!0,...u,children:g.jsx(Ge.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:d,onPointerMove:Oe(t.onPointerMove,y=>{y.pointerType!=="touch"&&!p.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Oe(t.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Oe(t.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Oe(t.onFocus,()=>{f.current||o.onOpen()}),onBlur:Oe(t.onBlur,o.onClose),onClick:Oe(t.onClick,o.onClose)})})});iC.displayName=Hg;var $1="TooltipPortal",[qD,VD]=Nh($1,{forceMount:void 0}),sC=t=>{const{__scopeTooltip:e,forceMount:n,children:i,container:o}=t,l=sd($1,e);return g.jsx(qD,{scope:e,forceMount:n,children:g.jsx(An,{present:n||l.open,children:g.jsx(dc,{asChild:!0,container:o,children:i})})})};sC.displayName=$1;var nc="TooltipContent",oC=D.forwardRef((t,e)=>{const n=VD(nc,t.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...l}=t,u=sd(nc,t.__scopeTooltip);return g.jsx(An,{present:i||u.open,children:u.disableHoverableContent?g.jsx(aC,{side:o,...l,ref:e}):g.jsx(WD,{side:o,...l,ref:e})})}),WD=D.forwardRef((t,e)=>{const n=sd(nc,t.__scopeTooltip),i=U1(nc,t.__scopeTooltip),o=D.useRef(null),l=_t(e,o),[u,a]=D.useState(null),{trigger:d,onClose:f}=n,p=o.current,{onPointerInTransitChange:h}=i,y=D.useCallback(()=>{a(null),h(!1)},[h]),S=D.useCallback((C,w)=>{const v=C.currentTarget,b={x:C.clientX,y:C.clientY},_=XD(b,v.getBoundingClientRect()),x=QD(b,_),k=ZD(w.getBoundingClientRect()),N=eM([...x,...k]);a(N),h(!0)},[h]);return D.useEffect(()=>()=>y(),[y]),D.useEffect(()=>{if(d&&p){const C=v=>S(v,p),w=v=>S(v,d);return d.addEventListener("pointerleave",C),p.addEventListener("pointerleave",w),()=>{d.removeEventListener("pointerleave",C),p.removeEventListener("pointerleave",w)}}},[d,p,S,y]),D.useEffect(()=>{if(u){const C=w=>{const v=w.target,b={x:w.clientX,y:w.clientY},_=(d==null?void 0:d.contains(v))||(p==null?void 0:p.contains(v)),x=!JD(b,u);_?y():x&&(y(),f())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,p,u,f,y]),g.jsx(aC,{...t,ref:l})}),[GD,KD]=Nh(Pu,{isInside:!1}),YD=V5("TooltipContent"),aC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:u,...a}=t,d=sd(nc,n),f=Dh(n),{onClose:p}=d;return D.useEffect(()=>(document.addEventListener(Fg,p),()=>document.removeEventListener(Fg,p)),[p]),D.useEffect(()=>{if(d.trigger){const h=y=>{const S=y.target;S!=null&&S.contains(d.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,p]),g.jsx(uc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:g.jsxs(vh,{"data-state":d.stateAttribute,...f,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(YD,{children:i}),g.jsx(GD,{scope:n,isInside:!0,children:g.jsx(Q5,{id:d.contentId,role:"tooltip",children:o||i})})]})})});oC.displayName=nc;var lC="TooltipArrow",cC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=Dh(n);return KD(lC,n).isInside?null:g.jsx(_h,{...o,...i,ref:e})});cC.displayName=lC;function XD(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),l=Math.abs(e.left-t.x);switch(Math.min(n,i,o,l)){case l:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function QD(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}function ZD(t){const{top:e,right:n,bottom:i,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:i},{x:o,y:i}]}function JD(t,e){const{x:n,y:i}=t;let o=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const a=e[l],d=e[u],f=a.x,p=a.y,h=d.x,y=d.y;p>i!=y>i&&n<(h-f)*(i-p)/(y-p)+f&&(o=!o)}return o}function eM(t){const e=t.slice();return e.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),tM(e)}function tM(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i<t.length;i++){const o=t[i];for(;e.length>=2;){const l=e[e.length-1],u=e[e.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const o=t[i];for(;n.length>=2;){const l=n[n.length-1],u=n[n.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var nM=nC,rM=rC,iM=iC,sM=sC,oM=oC,aM=cC;const lM=(t,e)=>{const n=new Array(t.length+e.length);for(let i=0;i<t.length;i++)n[i]=t[i];for(let i=0;i<e.length;i++)n[t.length+i]=e[i];return n},cM=(t,e)=>({classGroupId:t,validator:e}),uC=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Wf="-",vb=[],uM="arbitrary..",dM=t=>{const e=hM(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return fM(u);const a=u.split(Wf),d=a[0]===""&&a.length>1?1:0;return dC(a,d,e)},getConflictingClassGroupIds:(u,a)=>{if(a){const d=i[u],f=n[u];return d?f?lM(f,d):d:f||vb}return n[u]||vb}}},dC=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const f=dC(t,e+1,l);if(f)return f}const u=n.validators;if(u===null)return;const a=e===0?t.join(Wf):t.slice(e).join(Wf),d=u.length;for(let f=0;f<d;f++){const p=u[f];if(p.validator(a))return p.classGroupId}},fM=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),i=e.slice(0,n);return i?uM+i:void 0})(),hM=t=>{const{theme:e,classGroups:n}=t;return pM(n,e)},pM=(t,e)=>{const n=uC();for(const i in t){const o=t[i];q1(o,n,i,e)}return n},q1=(t,e,n,i)=>{const o=t.length;for(let l=0;l<o;l++){const u=t[l];mM(u,e,n,i)}},mM=(t,e,n,i)=>{if(typeof t=="string"){gM(t,e,n);return}if(typeof t=="function"){vM(t,e,n,i);return}_M(t,e,n,i)},gM=(t,e,n)=>{const i=t===""?e:fC(e,t);i.classGroupId=n},vM=(t,e,n,i)=>{if(yM(t)){q1(t(i),e,n,i);return}e.validators===null&&(e.validators=[]),e.validators.push(cM(n,t))},_M=(t,e,n,i)=>{const o=Object.entries(t),l=o.length;for(let u=0;u<l;u++){const[a,d]=o[u];q1(d,fC(e,a),n,i)}},fC=(t,e)=>{let n=t;const i=e.split(Wf),o=i.length;for(let l=0;l<o;l++){const u=i[l];let a=n.nextPart.get(u);a||(a=uC(),n.nextPart.set(u,a)),n=a}return n},yM=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,bM=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),i=Object.create(null);const o=(l,u)=>{n[l]=u,e++,e>t&&(e=0,i=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=i[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Ug="!",_b=":",xM=[],yb=(t,e,n,i,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),SM=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=o=>{const l=[];let u=0,a=0,d=0,f;const p=o.length;for(let w=0;w<p;w++){const v=o[w];if(u===0&&a===0){if(v===_b){l.push(o.slice(d,w)),d=w+1;continue}if(v==="/"){f=w;continue}}v==="["?u++:v==="]"?u--:v==="("?a++:v===")"&&a--}const h=l.length===0?o:o.slice(d);let y=h,S=!1;h.endsWith(Ug)?(y=h.slice(0,-1),S=!0):h.startsWith(Ug)&&(y=h.slice(1),S=!0);const C=f&&f>d?f-d:void 0;return yb(l,S,y,C)};if(e){const o=e+_b,l=i;i=u=>u.startsWith(o)?l(u.slice(o.length)):yb(xM,!1,u,void 0,!0)}if(n){const o=i;i=l=>n({className:l,parseClassName:o})}return i},wM=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,i)=>{e.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let l=0;l<n.length;l++){const u=n[l],a=u[0]==="[",d=e.has(u);a||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(u)):o.push(u)}return o.length>0&&(o.sort(),i.push(...o)),i}},CM=t=>({cache:bM(t.cacheSize),parseClassName:SM(t),sortModifiers:wM(t),...dM(t)}),kM=/\s+/,EM=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:l}=e,u=[],a=t.trim().split(kM);let d="";for(let f=a.length-1;f>=0;f-=1){const p=a[f],{isExternal:h,modifiers:y,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:w}=n(p);if(h){d=p+(d.length>0?" "+d:d);continue}let v=!!w,b=i(v?C.substring(0,w):C);if(!b){if(!v){d=p+(d.length>0?" "+d:d);continue}if(b=i(C),!b){d=p+(d.length>0?" "+d:d);continue}v=!1}const _=y.length===0?"":y.length===1?y[0]:l(y).join(":"),x=S?_+Ug:_,k=x+b;if(u.indexOf(k)>-1)continue;u.push(k);const N=o(b,v);for(let A=0;A<N.length;++A){const M=N[A];u.push(x+M)}d=p+(d.length>0?" "+d:d)}return d},AM=(...t)=>{let e=0,n,i,o="";for(;e<t.length;)(n=t[e++])&&(i=hC(n))&&(o&&(o+=" "),o+=i);return o},hC=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=hC(t[i]))&&(n&&(n+=" "),n+=e);return n},RM=(t,...e)=>{let n,i,o,l;const u=d=>{const f=e.reduce((p,h)=>h(p),t());return n=CM(f),i=n.cache.get,o=n.cache.set,l=a,a(d)},a=d=>{const f=i(d);if(f)return f;const p=EM(d,n);return o(d,p),p};return l=u,(...d)=>l(AM(...d))},TM=[],Sn=t=>{const e=n=>n[t]||TM;return e.isThemeGetter=!0,e},pC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,NM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,DM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,LM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xo=t=>NM.test(t),gt=t=>!!t&&!Number.isNaN(Number(t)),So=t=>!!t&&Number.isInteger(Number(t)),Xm=t=>t.endsWith("%")&>(t.slice(0,-1)),Rs=t=>DM.test(t),gC=()=>!0,IM=t=>MM.test(t)&&!jM.test(t),V1=()=>!1,BM=t=>OM.test(t),zM=t=>LM.test(t),PM=t=>!He(t)&&!qe(t),FM=t=>Po(t,yC,V1),He=t=>pC.test(t),Aa=t=>Po(t,bC,IM),bb=t=>Po(t,KM,gt),HM=t=>Po(t,SC,gC),UM=t=>Po(t,xC,V1),xb=t=>Po(t,vC,V1),$M=t=>Po(t,_C,zM),bf=t=>Po(t,wC,BM),qe=t=>mC.test(t),_u=t=>Pa(t,bC),qM=t=>Pa(t,xC),Sb=t=>Pa(t,vC),VM=t=>Pa(t,yC),WM=t=>Pa(t,_C),xf=t=>Pa(t,wC,!0),GM=t=>Pa(t,SC,!0),Po=(t,e,n)=>{const i=pC.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},Pa=(t,e,n=!1)=>{const i=mC.exec(t);return i?i[1]?e(i[1]):n:!1},vC=t=>t==="position"||t==="percentage",_C=t=>t==="image"||t==="url",yC=t=>t==="length"||t==="size"||t==="bg-size",bC=t=>t==="length",KM=t=>t==="number",xC=t=>t==="family-name",SC=t=>t==="number"||t==="weight",wC=t=>t==="shadow",YM=()=>{const t=Sn("color"),e=Sn("font"),n=Sn("text"),i=Sn("font-weight"),o=Sn("tracking"),l=Sn("leading"),u=Sn("breakpoint"),a=Sn("container"),d=Sn("spacing"),f=Sn("radius"),p=Sn("shadow"),h=Sn("inset-shadow"),y=Sn("text-shadow"),S=Sn("drop-shadow"),C=Sn("blur"),w=Sn("perspective"),v=Sn("aspect"),b=Sn("ease"),_=Sn("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...k(),qe,He],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],R=()=>[qe,He,d],j=()=>[xo,"full","auto",...R()],O=()=>[So,"none","subgrid",qe,He],B=()=>["auto",{span:["full",So,qe,He]},So,qe,He],q=()=>[So,"auto",qe,He],$=()=>["auto","min","max","fr",qe,He],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...R()],Y=()=>[xo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],Q=()=>[xo,"screen","full","dvw","lvw","svw","min","max","fit",...R()],I=()=>[xo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],L=()=>[t,qe,He],z=()=>[...k(),Sb,xb,{position:[qe,He]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",VM,FM,{size:[qe,He]}],J=()=>[Xm,_u,Aa],ne=()=>["","none","full",f,qe,He],Z=()=>["",gt,_u,Aa],W=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[gt,Xm,Sb,xb],ie=()=>["","none",C,qe,He],ae=()=>["none",gt,qe,He],se=()=>["none",gt,qe,He],_e=()=>[gt,qe,He],Te=()=>[xo,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rs],breakpoint:[Rs],color:[gC],container:[Rs],"drop-shadow":[Rs],ease:["in","out","in-out"],font:[PM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rs],shadow:[Rs],spacing:["px",gt],text:[Rs],"text-shadow":[Rs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xo,He,qe,v]}],container:["container"],columns:[{columns:[gt,He,qe,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[So,"auto",qe,He]}],basis:[{basis:[xo,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[gt,xo,"auto","initial","none",He]}],grow:[{grow:["",gt,qe,He]}],shrink:[{shrink:["",gt,qe,He]}],order:[{order:[So,"first","last","none",qe,He]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...I()]}],"min-block-size":[{"min-block":["auto",...I()]}],"max-block-size":[{"max-block":["none",...I()]}],w:[{w:[a,"screen",...Y()]}],"min-w":[{"min-w":[a,"screen","none",...Y()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[u]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,_u,Aa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,GM,HM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xm,He]}],"font-family":[{font:[qM,UM,e]}],"font-features":[{"font-features":[He]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,qe,He]}],"line-clamp":[{"line-clamp":[gt,"none",qe,bb]}],leading:[{leading:[l,...R()]}],"list-image":[{"list-image":["none",qe,He]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",qe,He]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[gt,"from-font","auto",qe,Aa]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[gt,"auto",qe,He]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe,He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qe,He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},So,qe,He],radial:["",qe,He],conic:[So,qe,He]},WM,$M]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-bs":[{"border-bs":Z()}],"border-w-be":[{"border-be":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[gt,qe,He]}],"outline-w":[{outline:["",gt,_u,Aa]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",p,xf,bf]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",h,xf,bf]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[gt,Aa]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",y,xf,bf]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[gt,qe,He]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[gt]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[qe,He]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[gt]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",qe,He]}],filter:[{filter:["","none",qe,He]}],blur:[{blur:ie()}],brightness:[{brightness:[gt,qe,He]}],contrast:[{contrast:[gt,qe,He]}],"drop-shadow":[{"drop-shadow":["","none",S,xf,bf]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",gt,qe,He]}],"hue-rotate":[{"hue-rotate":[gt,qe,He]}],invert:[{invert:["",gt,qe,He]}],saturate:[{saturate:[gt,qe,He]}],sepia:[{sepia:["",gt,qe,He]}],"backdrop-filter":[{"backdrop-filter":["","none",qe,He]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[gt,qe,He]}],"backdrop-contrast":[{"backdrop-contrast":[gt,qe,He]}],"backdrop-grayscale":[{"backdrop-grayscale":["",gt,qe,He]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[gt,qe,He]}],"backdrop-invert":[{"backdrop-invert":["",gt,qe,He]}],"backdrop-opacity":[{"backdrop-opacity":[gt,qe,He]}],"backdrop-saturate":[{"backdrop-saturate":[gt,qe,He]}],"backdrop-sepia":[{"backdrop-sepia":["",gt,qe,He]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",qe,He]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[gt,"initial",qe,He]}],ease:[{ease:["linear","initial",b,qe,He]}],delay:[{delay:[gt,qe,He]}],animate:[{animate:["none",_,qe,He]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,qe,He]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[qe,He,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qe,He]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qe,He]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[gt,_u,Aa,bb]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},XM=RM(YM);function Ee(...t){return XM(sh(t))}const QM=cc("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ze(t){const e=ve.c(16);let n,i,o,l,u;e[0]!==t?({className:n,variant:o,size:l,asChild:u,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5]);const a=o===void 0?"default":o,d=l===void 0?"default":l,p=(u===void 0?!1:u)?Yu:"button";let h;e[6]!==n||e[7]!==d||e[8]!==a?(h=Ee(QM({variant:a,size:d,className:n})),e[6]=n,e[7]=d,e[8]=a,e[9]=h):h=e[9];let y;return e[10]!==p||e[11]!==i||e[12]!==d||e[13]!==h||e[14]!==a?(y=g.jsx(p,{"data-slot":"button","data-variant":a,"data-size":d,className:h,...i}),e[10]=p,e[11]=i,e[12]=d,e[13]=h,e[14]=a,e[15]=y):y=e[15],y}function od(){const t=ve.c(1),e=ZM;let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n={fetchWithAuth:e},t[0]=n):n=t[0],n}async function ZM(t,e,n){const i=e===void 0?{}:e,{serverUrl:o,token:l}=n||{};let u=t;t.startsWith("/")&&o&&(u=`http://${o}${t}`);const a=new Headers(i.headers||{});return l&&a.set("Authorization",`Bearer ${l}`),fetch(u,{...i,headers:a})}function JM(t){const n=t.replace(/\\/g,"/").split("/");return n.pop(),n.join("/")||"/"}function e8(...t){return t.map((e,n)=>n===0?e.replace(/\/+$/,""):e.replace(/^\/+|\/+$/g,"")).filter(Boolean).join("/")}function mc(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(m1,{"data-slot":"dialog",...n}),e[2]=n,e[3]=i):i=e[3],i}function t8(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(g1,{"data-slot":"dialog-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function n8(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(dh,{"data-slot":"dialog-close",...n}),e[2]=n,e[3]=i):i=e[3],i}function r8(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(v1,{"data-slot":"dialog-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function gc(t){const e=ve.c(15);let n,i,o,l;e[0]!==t?({className:i,children:n,showCloseButton:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=l===void 0?!0:l;let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(r8,{}),e[5]=a):a=e[5];let d;e[6]!==i?(d=Ee("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),e[6]=i,e[7]=d):d=e[7];let f;e[8]!==u?(f=u&&g.jsx(dh,{"data-slot":"dialog-close",asChild:!0,children:g.jsxs(ze,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[g.jsx(Ns,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})}),e[8]=u,e[9]=f):f=e[9];let p;return e[10]!==n||e[11]!==o||e[12]!==d||e[13]!==f?(p=g.jsxs(t8,{children:[a,g.jsxs(_1,{"data-slot":"dialog-content",className:d,...o,children:[n,f]})]}),e[10]=n,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function vc(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex flex-col gap-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"dialog-header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Mh(t){const e=ve.c(14);let n,i,o,l;e[0]!==t?({className:i,showCloseButton:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=l===void 0?!1:l;let a;e[5]!==i?(a=Ee("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",i),e[5]=i,e[6]=a):a=e[6];let d;e[7]!==u?(d=u&&g.jsx(dh,{asChild:!0,children:g.jsx(ze,{variant:"outline",children:"Close"})}),e[7]=u,e[8]=d):d=e[8];let f;return e[9]!==n||e[10]!==o||e[11]!==a||e[12]!==d?(f=g.jsxs("div",{"data-slot":"dialog-footer",className:a,...o,children:[n,d]}),e[9]=n,e[10]=o,e[11]=a,e[12]=d,e[13]=f):f=e[13],f}function _c(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-base leading-none font-medium",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(OS,{"data-slot":"dialog-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function ad(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(LS,{"data-slot":"dialog-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Nf(t){const e=ve.c(10);let n,i,o;e[0]!==t?({className:n,type:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n?(l=Ee("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),e[4]=n,e[5]=l):l=e[5];let u;return e[6]!==i||e[7]!==l||e[8]!==o?(u=g.jsx("input",{type:o,"data-slot":"input",className:l,...i}),e[6]=i,e[7]=l,e[8]=o,e[9]=u):u=e[9],u}const yc=D.forwardRef((t,e)=>{const n=ve.c(16);let i,o,l;n[0]!==t?({className:o,children:i,...l}=t,n[0]=t,n[1]=i,n[2]=o,n[3]=l):(i=n[1],o=n[2],l=n[3]);let u;n[4]!==o?(u=Ee("relative overflow-hidden",o),n[4]=o,n[5]=u):u=n[5];let a;n[6]===Symbol.for("react.memo_cache_sentinel")?(a={WebkitOverflowScrolling:"touch"},n[6]=a):a=n[6];let d;n[7]!==i||n[8]!==e?(d=g.jsx(KN,{ref:e,"data-slot":"scroll-area-viewport",className:"size-full min-w-0 rounded-[inherit] outline-none",style:a,children:i}),n[7]=i,n[8]=e,n[9]=d):d=n[9];let f,p;n[10]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(i8,{}),p=g.jsx(YN,{}),n[10]=f,n[11]=p):(f=n[10],p=n[11]);let h;return n[12]!==l||n[13]!==u||n[14]!==d?(h=g.jsxs(GN,{"data-slot":"scroll-area",className:u,...l,children:[d,f,p]}),n[12]=l,n[13]=u,n[14]=d,n[15]=h):h=n[15],h});yc.displayName="ScrollArea";function i8(t){const e=ve.c(11);let n,i,o;e[0]!==t?({className:n,orientation:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"vertical":o;let u;e[4]!==n?(u=Ee("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",n),e[4]=n,e[5]=u):u=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(dw,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[6]=a):a=e[6];let d;return e[7]!==l||e[8]!==i||e[9]!==u?(d=g.jsx(aw,{"data-slot":"scroll-area-scrollbar","data-orientation":l,orientation:l,className:u,...i,children:a}),e[7]=l,e[8]=i,e[9]=u,e[10]=d):d=e[10],d}function s8({open:t,onOpenChange:e,onSelect:n,initialPath:i,title:o="Select Folder"}){var G;const[l,u]=D.useState(i||""),[a,d]=D.useState([]),[f,p]=D.useState(!1),[h,y]=D.useState(0),[S,C]=D.useState(null),[w,v]=D.useState(""),b=D.useRef(null),_=D.useRef(null),{fetchWithAuth:x}=od(),{activeServer:k}=lc(),N=D.useCallback(async Y=>{p(!0),C(null),y(0),v("");try{const Q=await x(`/api/fs/browse?path=${encodeURIComponent(Y)}`,{},{serverUrl:k==null?void 0:k.url,token:k==null?void 0:k.token}),I=await Q.json();if(!Q.ok)throw new Error(I.message||"Failed to browse directory");const L=I.files.filter(z=>z.type==="directory");d(L),u(I.currentPath)}catch(Q){C(Q instanceof Error?Q.message:"Failed to load directory"),d([])}finally{p(!1)}},[x,k]);D.useEffect(()=>{t&&N(i||"")},[t,i,N]),D.useEffect(()=>{y(0)},[w]);const A=a.filter(Y=>Y.name.toLowerCase().includes(w.toLowerCase())),M=(G=A[h])!=null?G:null,R=D.useCallback(Y=>e8(l,Y.name),[l]),j=M?R(M):l,O=!M,B=()=>{const Y=JM(l);Y!==l&&N(Y)},q=()=>{j&&(n(j),e(!1))},$=Y=>{const Q=R(Y);N(Q)},V=Y=>{if(A.length!==0)switch(Y.key){case"ArrowDown":Y.preventDefault(),y(Q=>Math.min(Q+1,A.length-1));break;case"ArrowRight":A[h]&&(Y.preventDefault(),$(A[h]));break;case"ArrowUp":Y.preventDefault(),y(Q=>Math.max(Q-1,0));break;case"Enter":Y.preventDefault(),q();break;case"Escape":w&&(Y.preventDefault(),v(""));break}};D.useEffect(()=>{if(_.current&&A.length>0){const Y=_.current.children[h];Y&&Y.scrollIntoView({block:"nearest"})}},[h,A.length]),D.useEffect(()=>{t&&setTimeout(()=>{var Y;return(Y=b.current)==null?void 0:Y.focus()},100)},[t]);const K=(Y,Q=50)=>{if(Y.length<=Q)return Y;const I=Y.split("/");return I.length<=2?Y:".../"+I.slice(-2).join("/")};return g.jsx(mc,{open:t,onOpenChange:e,children:g.jsxs(gc,{className:"sm:max-w-lg",onKeyDown:V,children:[g.jsx(vc,{children:g.jsx(_c,{children:o})}),g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded-md",children:[g.jsx(ze,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-shrink-0",onClick:B,disabled:f||!l,children:g.jsx(qE,{className:"w-4 h-4"})}),g.jsx("span",{className:"flex-1 text-sm font-mono truncate",title:j,children:M?g.jsx("span",{className:"text-primary",children:K(R(M),45)}):K(l)||"Home"})]}),g.jsxs("div",{className:"relative",children:[g.jsx(o1,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),g.jsx(Nf,{ref:b,placeholder:"Filter folders...",value:w,onChange:Y=>v(Y.target.value),className:"pl-8"})]}),g.jsx(yc,{className:"h-64 border rounded-md",children:f?g.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[g.jsx(Br,{className:"w-4 h-4 animate-spin mr-2"}),"Loading..."]}):S?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground",children:[g.jsx("span",{className:"text-destructive",children:S}),g.jsx(ze,{variant:"ghost",size:"sm",onClick:()=>N(l),className:"mt-2",children:"Retry"})]}):A.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground text-sm",children:[g.jsx(Ao,{className:"w-8 h-8 mb-2 opacity-50"}),w?"No matching folders":"No folders in this directory"]}):g.jsx("div",{className:"p-1",ref:_,children:A.map((Y,Q)=>g.jsxs("button",{onClick:()=>y(Q),onDoubleClick:()=>$(Y),className:Ee("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",Q===h&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[g.jsx(Ao,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}),g.jsx("span",{className:"truncate flex-1",children:Y.name}),Q===h&&g.jsx(Ds,{className:"w-4 h-4 text-primary"})]},Y.path))})}),S&&g.jsx("p",{className:"text-xs text-destructive",children:S})]}),g.jsxs(Mh,{children:[g.jsx(ze,{variant:"outline",onClick:()=>e(!1),children:"Cancel"}),g.jsx(ze,{onClick:q,disabled:!j||f,children:O?"Use This Folder":"Add Selected Folder"})]})]})})}function $g(t){const e=ve.c(26),{open:n,onOpenChange:i,title:o,description:l,confirmLabel:u,cancelLabel:a,onConfirm:d,variant:f}=t,p=u===void 0?"Confirm":u,h=a===void 0?"Cancel":a,y=f===void 0?"default":f;let S;e[0]!==d||e[1]!==i?(S=()=>{d(),i(!1)},e[0]=d,e[1]=i,e[2]=S):S=e[2];const C=S;let w;e[3]!==o?(w=g.jsx(_c,{children:o}),e[3]=o,e[4]=w):w=e[4];let v;e[5]!==l?(v=g.jsx(ad,{children:l}),e[5]=l,e[6]=v):v=e[6];let b;e[7]!==w||e[8]!==v?(b=g.jsxs(vc,{children:[w,v]}),e[7]=w,e[8]=v,e[9]=b):b=e[9];let _;e[10]!==h?(_=g.jsx(n8,{asChild:!0,children:g.jsx(ze,{variant:"outline",children:h})}),e[10]=h,e[11]=_):_=e[11];const x=y==="destructive"?"destructive":"default";let k;e[12]!==p||e[13]!==C||e[14]!==x?(k=g.jsx(ze,{onClick:C,variant:x,children:p}),e[12]=p,e[13]=C,e[14]=x,e[15]=k):k=e[15];let N;e[16]!==k||e[17]!==_?(N=g.jsxs(Mh,{children:[_,k]}),e[16]=k,e[17]=_,e[18]=N):N=e[18];let A;e[19]!==N||e[20]!==b?(A=g.jsxs(gc,{showCloseButton:!1,children:[b,N]}),e[19]=N,e[20]=b,e[21]=A):A=e[21];let M;return e[22]!==i||e[23]!==n||e[24]!==A?(M=g.jsx(mc,{open:n,onOpenChange:i,children:A}),e[22]=i,e[23]=n,e[24]=A,e[25]=M):M=e[25],M}function CC(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(aN,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=i):i=e[3],i}function kC(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(lN,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function EC(t){const e=ve.c(12);let n,i,o,l;e[0]!==t?({className:n,align:o,sideOffset:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=o===void 0?"start":o,a=l===void 0?4:l;let d;e[5]!==n?(d=Ee("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),e[5]=n,e[6]=d):d=e[6];let f;return e[7]!==u||e[8]!==i||e[9]!==a||e[10]!==d?(f=g.jsx(cN,{children:g.jsx(uN,{"data-slot":"dropdown-menu-content",sideOffset:a,align:u,className:d,...i})}),e[7]=u,e[8]=i,e[9]=a,e[10]=d,e[11]=f):f=e[11],f}function Tu(t){const e=ve.c(12);let n,i,o,l;e[0]!==t?({className:n,inset:i,variant:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=l===void 0?"default":l;let a;e[5]!==n?(a=Ee("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),e[5]=n,e[6]=a):a=e[6];let d;return e[7]!==i||e[8]!==o||e[9]!==a||e[10]!==u?(d=g.jsx(dN,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":u,className:a,...o}),e[7]=i,e[8]=o,e[9]=a,e[10]=u,e[11]=d):d=e[11],d}var wb=1,o8=.9,a8=.8,l8=.17,Qm=.1,Zm=.999,c8=.9999,u8=.99,d8=/[\\\/_+.#"@\[\(\{&]/,f8=/[\\\/_+.#"@\[\(\{&]/g,h8=/[\s-]/,AC=/[\s-]/g;function qg(t,e,n,i,o,l,u){if(l===e.length)return o===t.length?wb:u8;var a=`${o},${l}`;if(u[a]!==void 0)return u[a];for(var d=i.charAt(l),f=n.indexOf(d,o),p=0,h,y,S,C;f>=0;)h=qg(t,e,n,i,f+1,l+1,u),h>p&&(f===o?h*=wb:d8.test(t.charAt(f-1))?(h*=a8,S=t.slice(o,f-1).match(f8),S&&o>0&&(h*=Math.pow(Zm,S.length))):h8.test(t.charAt(f-1))?(h*=o8,C=t.slice(o,f-1).match(AC),C&&o>0&&(h*=Math.pow(Zm,C.length))):(h*=l8,o>0&&(h*=Math.pow(Zm,f-o))),t.charAt(f)!==e.charAt(l)&&(h*=c8)),(h<Qm&&n.charAt(f-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&n.charAt(f-1)!==i.charAt(l))&&(y=qg(t,e,n,i,f+1,l+2,u),y*Qm>h&&(h=y*Qm)),h>p&&(p=h),f=n.indexOf(d,f+1);return u[a]=p,p}function Cb(t){return t.toLowerCase().replace(AC," ")}function p8(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,qg(t,e,Cb(t),Cb(e),0,0,{})}var yu='[cmdk-group=""]',Jm='[cmdk-group-items=""]',m8='[cmdk-group-heading=""]',RC='[cmdk-item=""]',kb=`${RC}:not([aria-disabled="true"])`,Vg="cmdk-item-select",$l="data-value",g8=(t,e,n)=>p8(t,e,n),TC=D.createContext(void 0),ld=()=>D.useContext(TC),NC=D.createContext(void 0),W1=()=>D.useContext(NC),DC=D.createContext(void 0),MC=D.forwardRef((t,e)=>{let n=ql(()=>{var H,F;return{search:"",value:(F=(H=t.value)!=null?H:t.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=ql(()=>new Set),o=ql(()=>new Map),l=ql(()=>new Map),u=ql(()=>new Set),a=jC(t),{label:d,children:f,value:p,onValueChange:h,filter:y,shouldFilter:S,loop:C,disablePointerSelection:w=!1,vimBindings:v=!0,...b}=t,_=wn(),x=wn(),k=wn(),N=D.useRef(null),A=A8();La(()=>{if(p!==void 0){let H=p.trim();n.current.value=H,M.emit()}},[p]),La(()=>{A(6,$)},[]);let M=D.useMemo(()=>({subscribe:H=>(u.current.add(H),()=>u.current.delete(H)),snapshot:()=>n.current,setState:(H,F,J)=>{var ne,Z,W,U;if(!Object.is(n.current[H],F)){if(n.current[H]=F,H==="search")q(),O(),A(1,B);else if(H==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(k);te?te.focus():(ne=document.getElementById(_))==null||ne.focus()}if(A(7,()=>{var te;n.current.selectedItemId=(te=V())==null?void 0:te.id,M.emit()}),J||A(5,$),((Z=a.current)==null?void 0:Z.value)!==void 0){let te=F!=null?F:"";(U=(W=a.current).onValueChange)==null||U.call(W,te);return}}M.emit()}},emit:()=>{u.current.forEach(H=>H())}}),[]),R=D.useMemo(()=>({value:(H,F,J)=>{var ne;F!==((ne=l.current.get(H))==null?void 0:ne.value)&&(l.current.set(H,{value:F,keywords:J}),n.current.filtered.items.set(H,j(F,J)),A(2,()=>{O(),M.emit()}))},item:(H,F)=>(i.current.add(H),F&&(o.current.has(F)?o.current.get(F).add(H):o.current.set(F,new Set([H]))),A(3,()=>{q(),O(),n.current.value||B(),M.emit()}),()=>{l.current.delete(H),i.current.delete(H),n.current.filtered.items.delete(H);let J=V();A(4,()=>{q(),(J==null?void 0:J.getAttribute("id"))===H&&B(),M.emit()})}),group:H=>(o.current.has(H)||o.current.set(H,new Set),()=>{l.current.delete(H),o.current.delete(H)}),filter:()=>a.current.shouldFilter,label:d||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:_,inputId:k,labelId:x,listInnerRef:N}),[]);function j(H,F){var J,ne;let Z=(ne=(J=a.current)==null?void 0:J.filter)!=null?ne:g8;return H?Z(H,n.current.search,F):0}function O(){if(!n.current.search||a.current.shouldFilter===!1)return;let H=n.current.filtered.items,F=[];n.current.filtered.groups.forEach(ne=>{let Z=o.current.get(ne),W=0;Z.forEach(U=>{let te=H.get(U);W=Math.max(te,W)}),F.push([ne,W])});let J=N.current;K().sort((ne,Z)=>{var W,U;let te=ne.getAttribute("id"),ie=Z.getAttribute("id");return((W=H.get(ie))!=null?W:0)-((U=H.get(te))!=null?U:0)}).forEach(ne=>{let Z=ne.closest(Jm);Z?Z.appendChild(ne.parentElement===Z?ne:ne.closest(`${Jm} > *`)):J.appendChild(ne.parentElement===J?ne:ne.closest(`${Jm} > *`))}),F.sort((ne,Z)=>Z[1]-ne[1]).forEach(ne=>{var Z;let W=(Z=N.current)==null?void 0:Z.querySelector(`${yu}[${$l}="${encodeURIComponent(ne[0])}"]`);W==null||W.parentElement.appendChild(W)})}function B(){let H=K().find(J=>J.getAttribute("aria-disabled")!=="true"),F=H==null?void 0:H.getAttribute($l);M.setState("value",F||void 0)}function q(){var H,F,J,ne;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let Z=0;for(let W of i.current){let U=(F=(H=l.current.get(W))==null?void 0:H.value)!=null?F:"",te=(ne=(J=l.current.get(W))==null?void 0:J.keywords)!=null?ne:[],ie=j(U,te);n.current.filtered.items.set(W,ie),ie>0&&Z++}for(let[W,U]of o.current)for(let te of U)if(n.current.filtered.items.get(te)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=Z}function $(){var H,F,J;let ne=V();ne&&(((H=ne.parentElement)==null?void 0:H.firstChild)===ne&&((J=(F=ne.closest(yu))==null?void 0:F.querySelector(m8))==null||J.scrollIntoView({block:"nearest"})),ne.scrollIntoView({block:"nearest"}))}function V(){var H;return(H=N.current)==null?void 0:H.querySelector(`${RC}[aria-selected="true"]`)}function K(){var H;return Array.from(((H=N.current)==null?void 0:H.querySelectorAll(kb))||[])}function G(H){let F=K()[H];F&&M.setState("value",F.getAttribute($l))}function Y(H){var F;let J=V(),ne=K(),Z=ne.findIndex(U=>U===J),W=ne[Z+H];(F=a.current)!=null&&F.loop&&(W=Z+H<0?ne[ne.length-1]:Z+H===ne.length?ne[0]:ne[Z+H]),W&&M.setState("value",W.getAttribute($l))}function Q(H){let F=V(),J=F==null?void 0:F.closest(yu),ne;for(;J&&!ne;)J=H>0?k8(J,yu):E8(J,yu),ne=J==null?void 0:J.querySelector(kb);ne?M.setState("value",ne.getAttribute($l)):Y(H)}let I=()=>G(K().length-1),L=H=>{H.preventDefault(),H.metaKey?I():H.altKey?Q(1):Y(1)},z=H=>{H.preventDefault(),H.metaKey?G(0):H.altKey?Q(-1):Y(-1)};return D.createElement(Ge.div,{ref:e,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:H=>{var F;(F=b.onKeyDown)==null||F.call(b,H);let J=H.nativeEvent.isComposing||H.keyCode===229;if(!(H.defaultPrevented||J))switch(H.key){case"n":case"j":{v&&H.ctrlKey&&L(H);break}case"ArrowDown":{L(H);break}case"p":case"k":{v&&H.ctrlKey&&z(H);break}case"ArrowUp":{z(H);break}case"Home":{H.preventDefault(),G(0);break}case"End":{H.preventDefault(),I();break}case"Enter":{H.preventDefault();let ne=V();if(ne){let Z=new Event(Vg);ne.dispatchEvent(Z)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:T8},d),jh(t,H=>D.createElement(NC.Provider,{value:M},D.createElement(TC.Provider,{value:R},H))))}),v8=D.forwardRef((t,e)=>{var n,i;let o=wn(),l=D.useRef(null),u=D.useContext(DC),a=ld(),d=jC(t),f=(i=(n=d.current)==null?void 0:n.forceMount)!=null?i:u==null?void 0:u.forceMount;La(()=>{if(!f)return a.item(o,u==null?void 0:u.id)},[f]);let p=OC(o,l,[t.value,t.children,l],t.keywords),h=W1(),y=Do(A=>A.value&&A.value===p.current),S=Do(A=>f||a.filter()===!1?!0:A.search?A.filtered.items.get(o)>0:!0);D.useEffect(()=>{let A=l.current;if(!(!A||t.disabled))return A.addEventListener(Vg,C),()=>A.removeEventListener(Vg,C)},[S,t.onSelect,t.disabled]);function C(){var A,M;w(),(M=(A=d.current).onSelect)==null||M.call(A,p.current)}function w(){h.setState("value",p.current,!0)}if(!S)return null;let{disabled:v,value:b,onSelect:_,forceMount:x,keywords:k,...N}=t;return D.createElement(Ge.div,{ref:Ms(l,e),...N,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!y,"data-disabled":!!v,"data-selected":!!y,onPointerMove:v||a.getDisablePointerSelection()?void 0:w,onClick:v?void 0:C},t.children)}),_8=D.forwardRef((t,e)=>{let{heading:n,children:i,forceMount:o,...l}=t,u=wn(),a=D.useRef(null),d=D.useRef(null),f=wn(),p=ld(),h=Do(S=>o||p.filter()===!1?!0:S.search?S.filtered.groups.has(u):!0);La(()=>p.group(u),[]),OC(u,a,[t.value,t.heading,d]);let y=D.useMemo(()=>({id:u,forceMount:o}),[o]);return D.createElement(Ge.div,{ref:Ms(a,e),...l,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&D.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),jh(t,S=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},D.createElement(DC.Provider,{value:y},S))))}),y8=D.forwardRef((t,e)=>{let{alwaysRender:n,...i}=t,o=D.useRef(null),l=Do(u=>!u.search);return!n&&!l?null:D.createElement(Ge.div,{ref:Ms(o,e),...i,"cmdk-separator":"",role:"separator"})}),b8=D.forwardRef((t,e)=>{let{onValueChange:n,...i}=t,o=t.value!=null,l=W1(),u=Do(f=>f.search),a=Do(f=>f.selectedItemId),d=ld();return D.useEffect(()=>{t.value!=null&&l.setState("search",t.value)},[t.value]),D.createElement(Ge.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":a,id:d.inputId,type:"text",value:o?t.value:u,onChange:f=>{o||l.setState("search",f.target.value),n==null||n(f.target.value)}})}),x8=D.forwardRef((t,e)=>{let{children:n,label:i="Suggestions",...o}=t,l=D.useRef(null),u=D.useRef(null),a=Do(f=>f.selectedItemId),d=ld();return D.useEffect(()=>{if(u.current&&l.current){let f=u.current,p=l.current,h,y=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let S=f.offsetHeight;p.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return y.observe(f),()=>{cancelAnimationFrame(h),y.unobserve(f)}}},[]),D.createElement(Ge.div,{ref:Ms(l,e),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:d.listId},jh(t,f=>D.createElement("div",{ref:Ms(u,d.listInnerRef),"cmdk-list-sizer":""},f)))}),S8=D.forwardRef((t,e)=>{let{open:n,onOpenChange:i,overlayClassName:o,contentClassName:l,container:u,...a}=t;return D.createElement(m1,{open:n,onOpenChange:i},D.createElement(g1,{container:u},D.createElement(v1,{"cmdk-overlay":"",className:o}),D.createElement(_1,{"aria-label":t.label,"cmdk-dialog":"",className:l},D.createElement(MC,{ref:e,...a}))))}),w8=D.forwardRef((t,e)=>Do(n=>n.filtered.count===0)?D.createElement(Ge.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),C8=D.forwardRef((t,e)=>{let{progress:n,children:i,label:o="Loading...",...l}=t;return D.createElement(Ge.div,{ref:e,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},jh(t,u=>D.createElement("div",{"aria-hidden":!0},u)))}),Fa=Object.assign(MC,{List:x8,Item:v8,Input:b8,Group:_8,Separator:y8,Dialog:S8,Empty:w8,Loading:C8});function k8(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function E8(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function jC(t){let e=D.useRef(t);return La(()=>{e.current=t}),e}var La=typeof window>"u"?D.useEffect:D.useLayoutEffect;function ql(t){let e=D.useRef();return e.current===void 0&&(e.current=t()),e}function Do(t){let e=W1(),n=()=>t(e.snapshot());return D.useSyncExternalStore(e.subscribe,n,n)}function OC(t,e,n,i=[]){let o=D.useRef(),l=ld();return La(()=>{var u;let a=(()=>{var f;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(f=p.current.textContent)==null?void 0:f.trim():o.current}})(),d=i.map(f=>f.trim());l.value(t,a,d),(u=e.current)==null||u.setAttribute($l,a),o.current=a}),o}var A8=()=>{let[t,e]=D.useState(),n=ql(()=>new Map);return La(()=>{n.current.forEach(i=>i()),n.current=new Map},[t]),(i,o)=>{n.current.set(i,o),e({})}};function R8(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function jh({asChild:t,children:e},n){return t&&D.isValidElement(e)?D.cloneElement(R8(e),{ref:e.ref},n(e.props.children)):n(e)}var T8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function N8(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("textarea",{"data-slot":"textarea",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function D8(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"input-group",role:"group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const M8=cc("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function j8(t){const e=ve.c(11);let n,i,o;e[0]!==t?({className:n,align:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"inline-start":o;let u;e[4]!==l||e[5]!==n?(u=Ee(M8({align:l}),n),e[4]=l,e[5]=n,e[6]=u):u=e[6];let a;return e[7]!==l||e[8]!==i||e[9]!==u?(a=g.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":l,className:u,onClick:O8,...i}),e[7]=l,e[8]=i,e[9]=u,e[10]=a):a=e[10],a}function O8(t){var e,n;t.target.closest("button")||(n=(e=t.currentTarget.parentElement)==null?void 0:e.querySelector("input"))==null||n.focus()}function G1(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa,{"data-slot":"command",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function LC(t){const e=ve.c(11);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]!==i||e[6]!==o?(l=g.jsx(Fa.Input,{"data-slot":"command-input",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(j8,{children:g.jsx(o1,{className:"size-4 shrink-0 opacity-50"})}),e[8]=u):u=e[8];let a;return e[9]!==l?(a=g.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:g.jsxs(D8,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[l,u]})}),e[9]=l,e[10]=a):a=e[10],a}function K1(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa.List,{"data-slot":"command-list",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Y1(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("py-6 text-center text-sm",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa.Empty,{"data-slot":"command-empty",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Fu(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa.Group,{"data-slot":"command-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function IC(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("-mx-1 h-px bg-border",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Fa.Separator,{"data-slot":"command-separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Xl(t){const e=ve.c(14);let n,i,o,l;e[0]!==t?({className:i,children:n,showCheck:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=l===void 0?!0:l;let a;e[5]!==i?(a=Ee("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",i),e[5]=i,e[6]=a):a=e[6];let d;e[7]!==u?(d=u&&g.jsx(Ds,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"}),e[7]=u,e[8]=d):d=e[8];let f;return e[9]!==n||e[10]!==o||e[11]!==a||e[12]!==d?(f=g.jsxs(Fa.Item,{"data-slot":"command-item",className:a,...o,children:[n,d]}),e[9]=n,e[10]=o,e[11]=a,e[12]=d,e[13]=f):f=e[13],f}function Oh(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(wN,{"data-slot":"popover",...n}),e[2]=n,e[3]=i):i=e[3],i}function X1(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(kN,{"data-slot":"popover-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Lh(t){const e=ve.c(12);let n,i,o,l;e[0]!==t?({className:n,align:o,sideOffset:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=o===void 0?"center":o,a=l===void 0?4:l;let d;e[5]!==n?(d=Ee("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),e[5]=n,e[6]=d):d=e[6];let f;return e[7]!==u||e[8]!==i||e[9]!==a||e[10]!==d?(f=g.jsx(EN,{children:g.jsx(AN,{"data-slot":"popover-content",align:u,sideOffset:a,className:d,...i})}),e[7]=u,e[8]=i,e[9]=a,e[10]=d,e[11]=f):f=e[11],f}function L8(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(CN,{"data-slot":"popover-anchor",...n}),e[2]=n,e[3]=i):i=e[3],i}function I8(t){const e=ve.c(59),{workspaces:n,activeWorkspace:i,onSelectWorkspace:o,onCreateVirtualWorkspace:l,onCreatePhysicalWorkspace:u,isWorkspaceFavorited:a,onToggleFavorite:d,onDeleteWorkspace:f}=t,[p,h]=D.useState(!1),[y,S]=D.useState(!1),[C,w]=D.useState(null);let v;e[0]!==(i==null?void 0:i.isVirtual)?(v=i!=null&&i.isVirtual?g.jsx(Cg,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(Ao,{className:"size-4 flex-shrink-0 text-muted-foreground"}),e[0]=i==null?void 0:i.isVirtual,e[1]=v):v=e[1];const b=(i==null?void 0:i.name)||"Select workspace";let _;e[2]!==b?(_=g.jsx("span",{className:"truncate",children:b}),e[2]=b,e[3]=_):_=e[3];let x;e[4]!==v||e[5]!==_?(x=g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[v,_]}),e[4]=v,e[5]=_,e[6]=x):x=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(zx,{className:"ml-auto size-4 shrink-0 opacity-50"}),e[7]=k):k=e[7];let N;e[8]!==p||e[9]!==x?(N=g.jsx(X1,{asChild:!0,children:g.jsxs(ze,{variant:"outline",role:"combobox","aria-expanded":p,"aria-label":"Select workspace",className:"w-full justify-between h-9",children:[x,k]})}),e[8]=p,e[9]=x,e[10]=N):N=e[10];let A;e[11]===Symbol.for("react.memo_cache_sentinel")?(A=g.jsx(LC,{placeholder:"Search workspace..."}),e[11]=A):A=e[11];let M;e[12]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx(Y1,{children:"No workspace found."}),e[12]=M):M=e[12];let R;if(e[13]!==(i==null?void 0:i.id)||e[14]!==a||e[15]!==o||e[16]!==d||e[17]!==n){let Z;e[19]!==(i==null?void 0:i.id)||e[20]!==a||e[21]!==o||e[22]!==d?(Z=W=>g.jsxs(Xl,{showCheck:!1,onSelect:()=>{o(W),h(!1)},children:[g.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[W.isVirtual?g.jsx(Cg,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(Ao,{className:"size-4 flex-shrink-0 text-muted-foreground"}),g.jsx("span",{className:"truncate",children:W.name})]}),g.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[g.jsx("button",{className:"p-1 rounded hover:bg-secondary transition-colors",onClick:U=>{U.stopPropagation(),d(W.id,W.name)},title:a(W.id)?"Remove from favorites":"Add to favorites",children:a(W.id)?g.jsx(Ly,{className:"size-4 fill-primary text-primary"}):g.jsx(Ly,{className:"size-4 text-muted-foreground"})}),g.jsx(Ds,{className:Ee("size-4",(i==null?void 0:i.id)===W.id?"opacity-100":"opacity-0")}),g.jsxs(CC,{children:[g.jsx(kC,{asChild:!0,children:g.jsxs("button",{className:"p-1 rounded hover:bg-secondary transition-colors",onClick:B8,children:[g.jsx(Fx,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Workspace actions"})]})}),g.jsx(EC,{align:"end",children:g.jsxs(Tu,{onClick:U=>{U.stopPropagation(),w(W)},className:"text-destructive focus:text-destructive",children:[g.jsx(ac,{className:"size-4"}),"Delete workspace"]})})]})]})]},W.id),e[19]=i==null?void 0:i.id,e[20]=a,e[21]=o,e[22]=d,e[23]=Z):Z=e[23],R=n.map(Z),e[13]=i==null?void 0:i.id,e[14]=a,e[15]=o,e[16]=d,e[17]=n,e[18]=R}else R=e[18];let j;e[24]!==R?(j=g.jsx(Fu,{heading:"Workspaces",children:R}),e[24]=R,e[25]=j):j=e[25];let O;e[26]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(IC,{}),e[26]=O):O=e[26];let B;e[27]!==l?(B=()=>{l(),h(!1)},e[27]=l,e[28]=B):B=e[28];let q;e[29]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(oc,{className:"size-4","data-icon":"inline-start"}),e[29]=q):q=e[29];let $;e[30]!==B?($=g.jsxs(Xl,{onSelect:B,children:[q,"Create virtual workspace"]}),e[30]=B,e[31]=$):$=e[31];let V;e[32]===Symbol.for("react.memo_cache_sentinel")?(V=g.jsxs(Xl,{onSelect:()=>{h(!1),S(!0)},children:[g.jsx(Ao,{className:"size-4","data-icon":"inline-start"}),"Add existing folder"]}),e[32]=V):V=e[32];let K;e[33]!==$?(K=g.jsxs(Fu,{children:[$,V]}),e[33]=$,e[34]=K):K=e[34];let G;e[35]!==j||e[36]!==K?(G=g.jsx(Lh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(G1,{children:[A,g.jsxs(K1,{className:"max-h-[50vh] overflow-y-auto",children:[M,j,O,K]})]})}),e[35]=j,e[36]=K,e[37]=G):G=e[37];let Y;e[38]!==p||e[39]!==G||e[40]!==N?(Y=g.jsxs(Oh,{open:p,onOpenChange:h,children:[N,G]}),e[38]=p,e[39]=G,e[40]=N,e[41]=Y):Y=e[41];let Q;e[42]!==u?(Q=Z=>{u(Z),S(!1)},e[42]=u,e[43]=Q):Q=e[43];let I;e[44]!==y||e[45]!==Q?(I=g.jsx(s8,{open:y,onOpenChange:S,onSelect:Q,title:"Select Workspace Folder"}),e[44]=y,e[45]=Q,e[46]=I):I=e[46];const L=C!==null;let z;e[47]===Symbol.for("react.memo_cache_sentinel")?(z=Z=>!Z&&w(null),e[47]=z):z=e[47];const H=C?`Are you sure you want to delete "${C.name}"? This will permanently remove the workspace and all associated Jean data, including sessions, messages, and temporary files. The actual files in "${C.name}" on disk will not be deleted.`:"";let F;e[48]!==f||e[49]!==C?(F=()=>{C&&(f(C.id),w(null))},e[48]=f,e[49]=C,e[50]=F):F=e[50];let J;e[51]!==L||e[52]!==H||e[53]!==F?(J=g.jsx($g,{open:L,onOpenChange:z,title:"Delete Workspace",description:H,confirmLabel:"Delete",variant:"destructive",onConfirm:F}),e[51]=L,e[52]=H,e[53]=F,e[54]=J):J=e[54];let ne;return e[55]!==Y||e[56]!==I||e[57]!==J?(ne=g.jsxs(g.Fragment,{children:[Y,I,J]}),e[55]=Y,e[56]=I,e[57]=J,e[58]=ne):ne=e[58],ne}function B8(t){return t.stopPropagation()}function z8(t){const e=ve.c(33),{onOpenAddServer:n,onServerSwitch:i}=t,[o,l]=D.useState(!1),{servers:u,activeServer:a,switchServer:d}=lc();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(Na,{className:"size-4 flex-shrink-0 text-muted-foreground"}),e[0]=f):f=e[0];const p=(a==null?void 0:a.name)||"Select server";let h;e[1]!==p?(h=g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[f,g.jsx("span",{className:"truncate",children:p})]}),e[1]=p,e[2]=h):h=e[2];let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(zx,{className:"ml-auto size-4 shrink-0 opacity-50"}),e[3]=y):y=e[3];let S;e[4]!==o||e[5]!==h?(S=g.jsx(X1,{asChild:!0,children:g.jsxs(ze,{variant:"outline",role:"combobox","aria-expanded":o,"aria-label":"Select server",className:"w-full justify-between h-9",children:[h,y]})}),e[4]=o,e[5]=h,e[6]=S):S=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(LC,{placeholder:"Search server..."}),e[7]=C):C=e[7];let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(Y1,{children:"No server found."}),e[8]=w):w=e[8];let v;if(e[9]!==(a==null?void 0:a.id)||e[10]!==i||e[11]!==u||e[12]!==d){let R;e[14]!==(a==null?void 0:a.id)||e[15]!==i||e[16]!==d?(R=j=>g.jsxs(Xl,{onSelect:()=>{d(j.id),i==null||i(),l(!1)},className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Na,{className:"size-4 text-muted-foreground"}),g.jsx("span",{children:j.name})]}),g.jsx(Ds,{className:Ee("size-4",(a==null?void 0:a.id)===j.id?"opacity-100":"opacity-0")})]},j.id),e[14]=a==null?void 0:a.id,e[15]=i,e[16]=d,e[17]=R):R=e[17],v=u.map(R),e[9]=a==null?void 0:a.id,e[10]=i,e[11]=u,e[12]=d,e[13]=v}else v=e[13];let b;e[18]!==v?(b=g.jsx(Fu,{heading:"Servers",children:v}),e[18]=v,e[19]=b):b=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(IC,{}),e[20]=_):_=e[20];let x;e[21]!==n?(x=()=>{n(),l(!1)},e[21]=n,e[22]=x):x=e[22];let k;e[23]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(oc,{className:"size-4","data-icon":"inline-start"}),e[23]=k):k=e[23];let N;e[24]!==x?(N=g.jsx(Fu,{children:g.jsxs(Xl,{onSelect:x,children:[k,"Add Server..."]})}),e[24]=x,e[25]=N):N=e[25];let A;e[26]!==N||e[27]!==b?(A=g.jsx(Lh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(G1,{children:[C,g.jsxs(K1,{className:"max-h-[50vh] overflow-y-auto",children:[w,b,_,N]})]})}),e[26]=N,e[27]=b,e[28]=A):A=e[28];let M;return e[29]!==o||e[30]!==A||e[31]!==S?(M=g.jsxs(Oh,{open:o,onOpenChange:l,children:[S,A]}),e[29]=o,e[30]=A,e[31]=S,e[32]=M):M=e[32],M}const eg=640,tg=1300;function cd(){const t=ve.c(2),[e,n]=D.useState(void 0);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.matchMedia(`(max-width: ${eg-1}px)`),u=()=>{n(window.innerWidth<eg)};return l.addEventListener("change",u),n(window.innerWidth<eg),()=>l.removeEventListener("change",u)},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),!!e}function P8(){const t=ve.c(2),[e,n]=D.useState(void 0);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.matchMedia(`(max-width: ${tg-1}px)`),u=()=>{n(window.innerWidth<tg)};return l.addEventListener("change",u),n(window.innerWidth<tg),()=>l.removeEventListener("change",u)},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),!!e}function Eo(t){const e=ve.c(12);let n,i,o,l;e[0]!==t?({className:n,orientation:o,decorative:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=o===void 0?"horizontal":o,a=l===void 0?!0:l;let d;e[5]!==n?(d=Ee("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",n),e[5]=n,e[6]=d):d=e[6];let f;return e[7]!==a||e[8]!==u||e[9]!==i||e[10]!==d?(f=g.jsx(OD,{"data-slot":"separator",decorative:a,orientation:u,className:d,...i}),e[7]=a,e[8]=u,e[9]=i,e[10]=d,e[11]=f):f=e[11],f}function Ih(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(m1,{"data-slot":"sheet",...n}),e[2]=n,e[3]=i):i=e[3],i}function F8(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(wR,{"data-slot":"sheet-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function H8(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(g1,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function U8(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(v1,{"data-slot":"sheet-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Bh(t){const e=ve.c(24);let n,i,o,l,u,a;e[0]!==t?({className:i,children:n,side:u,showCloseButton:a,style:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u,e[6]=a):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5],a=e[6]);const d=u===void 0?"right":u,f=a===void 0?!0:a;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(U8,{}),e[7]=p):p=e[7];let h;e[8]!==i?(h=Ee("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",i),e[8]=i,e[9]=h):h=e[9];let y;e[10]!==d?(y=d==="left"||d==="right"?{top:"env(safe-area-inset-top, 0px)",bottom:"env(safe-area-inset-bottom, 0px)",height:"calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))"}:d==="top"?{top:"env(safe-area-inset-top, 0px)"}:d==="bottom"?{bottom:"env(safe-area-inset-bottom, 0px)"}:void 0,e[10]=d,e[11]=y):y=e[11];const S=y;let C;e[12]!==S||e[13]!==l?(C=S?{...S,...l}:l,e[12]=S,e[13]=l,e[14]=C):C=e[14];const w=C;let v;e[15]!==f?(v=f&&g.jsx(dh,{"data-slot":"sheet-close",asChild:!0,children:g.jsxs(ze,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[g.jsx(Ns,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})}),e[15]=f,e[16]=v):v=e[16];let b;return e[17]!==n||e[18]!==o||e[19]!==d||e[20]!==h||e[21]!==w||e[22]!==v?(b=g.jsxs(H8,{children:[p,g.jsxs(_1,{"data-slot":"sheet-content","data-side":d,className:h,style:w,...o,children:[n,v]})]}),e[17]=n,e[18]=o,e[19]=d,e[20]=h,e[21]=w,e[22]=v,e[23]=b):b=e[23],b}function zh(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex flex-col gap-0.5 p-4",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sheet-header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Ph(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-base font-medium text-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(OS,{"data-slot":"sheet-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function $8(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-sm text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(LS,{"data-slot":"sheet-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Gf(t){const e=ve.c(6);let n,i;e[0]!==t?({delayDuration:i,...n}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);const o=i===void 0?0:i;let l;return e[3]!==o||e[4]!==n?(l=g.jsx(nM,{"data-slot":"tooltip-provider",delayDuration:o,...n}),e[3]=o,e[4]=n,e[5]=l):l=e[5],l}function Hu(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(rM,{"data-slot":"tooltip",...n}),e[2]=n,e[3]=i):i=e[3],i}function Uu(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(iM,{"data-slot":"tooltip-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function $u(t){const e=ve.c(13);let n,i,o,l;e[0]!==t?({className:i,sideOffset:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=l===void 0?0:l;let a;e[5]!==i?(a=Ee("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),e[5]=i,e[6]=a):a=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(aM,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"}),e[7]=d):d=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==u||e[11]!==a?(f=g.jsx(sM,{children:g.jsxs(oM,{"data-slot":"tooltip-content",sideOffset:u,className:a,...o,children:[n,d]})}),e[8]=n,e[9]=o,e[10]=u,e[11]=a,e[12]=f):f=e[12],f}const q8="sidebar_state",V8=3600*24*7,W8="16rem",G8="18rem",K8="3rem",BC=D.createContext(null);function ud(){const t=D.useContext(BC);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Y8(t){const e=ve.c(33);let n,i,o,l,u,a,d;e[0]!==t?({defaultOpen:d,open:o,onOpenChange:u,className:i,style:a,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u,e[6]=a,e[7]=d):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5],a=e[6],d=e[7]);const f=d===void 0?!0:d,p=cd(),[h,y]=D.useState(!1),[S,C]=D.useState(f),w=o!=null?o:S;let v;e[8]!==w||e[9]!==u?(v=q=>{const $=typeof q=="function"?q(w):q;u?u($):C($),document.cookie=`${q8}=${$}; path=/; max-age=${V8}`},e[8]=w,e[9]=u,e[10]=v):v=e[10];const b=v;let _;e[11]!==p||e[12]!==b?(_=()=>p?y(Q8):b(X8),e[11]=p,e[12]=b,e[13]=_):_=e[13];const x=_,k=w?"expanded":"collapsed";let N;e[14]!==p||e[15]!==w||e[16]!==h||e[17]!==b||e[18]!==k||e[19]!==x?(N={state:k,open:w,setOpen:b,isMobile:p,openMobile:h,setOpenMobile:y,toggleSidebar:x},e[14]=p,e[15]=w,e[16]=h,e[17]=b,e[18]=k,e[19]=x,e[20]=N):N=e[20];const A=N;let M;e[21]!==a?(M={"--sidebar-width":W8,"--sidebar-width-icon":K8,...a},e[21]=a,e[22]=M):M=e[22];const R=M;let j;e[23]!==i?(j=Ee("overflow-hidden group/sidebar-wrapper flex h-full w-full has-data-[variant=inset]:bg-sidebar",i),e[23]=i,e[24]=j):j=e[24];let O;e[25]!==n||e[26]!==l||e[27]!==R||e[28]!==j?(O=g.jsx("div",{"data-slot":"sidebar-wrapper",style:R,className:j,...l,children:n}),e[25]=n,e[26]=l,e[27]=R,e[28]=j,e[29]=O):O=e[29];let B;return e[30]!==A||e[31]!==O?(B=g.jsx(BC.Provider,{value:A,children:O}),e[30]=A,e[31]=O,e[32]=B):B=e[32],B}function X8(t){return!t}function Q8(t){return!t}function Z8(t){const e=ve.c(49);let n,i,o,l,u,a,d;e[0]!==t?({side:u,variant:a,collapsible:d,className:i,children:n,dir:o,...l}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u,e[6]=a,e[7]=d):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5],a=e[6],d=e[7]);const f=u===void 0?"left":u,p=a===void 0?"sidebar":a,h=d===void 0?"offcanvas":d,{isMobile:y,state:S,openMobile:C,setOpenMobile:w}=ud();if(h==="none"){let O;e[8]!==i?(O=Ee("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),e[8]=i,e[9]=O):O=e[9];let B;return e[10]!==n||e[11]!==l||e[12]!==O?(B=g.jsx("div",{"data-slot":"sidebar",className:O,...l,children:n}),e[10]=n,e[11]=l,e[12]=O,e[13]=B):B=e[13],B}if(y){let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O={"--sidebar-width":G8},e[14]=O):O=e[14];let B;e[15]===Symbol.for("react.memo_cache_sentinel")?(B=g.jsxs(zh,{className:"sr-only",children:[g.jsx(Ph,{children:"Sidebar"}),g.jsx($8,{children:"Displays the mobile sidebar."})]}),e[15]=B):B=e[15];let q;e[16]!==n?(q=g.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[16]=n,e[17]=q):q=e[17];let $;e[18]!==o||e[19]!==f||e[20]!==q?($=g.jsxs(Bh,{dir:o,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:O,side:f,children:[B,q]}),e[18]=o,e[19]=f,e[20]=q,e[21]=$):$=e[21];let V;return e[22]!==C||e[23]!==l||e[24]!==w||e[25]!==$?(V=g.jsx(Ih,{open:C,onOpenChange:w,...l,children:$}),e[22]=C,e[23]=l,e[24]=w,e[25]=$,e[26]=V):V=e[26],V}const v=S==="collapsed"?h:"",b=p==="floating"||p==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let _;e[27]!==b?(_=Ee("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[27]=b,e[28]=_):_=e[28];let x;e[29]!==_?(x=g.jsx("div",{"data-slot":"sidebar-gap",className:_}),e[29]=_,e[30]=x):x=e[30];const k=p==="floating"||p==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let N;e[31]!==i||e[32]!==k?(N=Ee("fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",k,i),e[31]=i,e[32]=k,e[33]=N):N=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A={top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)",height:"calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0))"},e[34]=A):A=e[34];let M;e[35]!==n?(M=g.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n}),e[35]=n,e[36]=M):M=e[36];let R;e[37]!==l||e[38]!==f||e[39]!==M||e[40]!==N?(R=g.jsx("div",{"data-slot":"sidebar-container","data-side":f,className:N,style:A,...l,children:M}),e[37]=l,e[38]=f,e[39]=M,e[40]=N,e[41]=R):R=e[41];let j;return e[42]!==f||e[43]!==S||e[44]!==R||e[45]!==v||e[46]!==x||e[47]!==p?(j=g.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":S,"data-collapsible":v,"data-variant":p,"data-side":f,"data-slot":"sidebar",children:[x,R]}),e[42]=f,e[43]=S,e[44]=R,e[45]=v,e[46]=x,e[47]=p,e[48]=j):j=e[48],j}function Eb(t){const e=ve.c(15);let n,i,o;e[0]!==t?({className:n,onClick:i,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const{toggleSidebar:l}=ud();let u;e[4]!==n?(u=Ee(n),e[4]=n,e[5]=u):u=e[5];let a;e[6]!==i||e[7]!==l?(a=h=>{i==null||i(h),l()},e[6]=i,e[7]=l,e[8]=a):a=e[8];let d,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(q4,{}),f=g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=f):(d=e[9],f=e[10]);let p;return e[11]!==o||e[12]!==u||e[13]!==a?(p=g.jsxs(ze,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:u,onClick:a,...o,children:[d,f]}),e[11]=o,e[12]=u,e[13]=a,e[14]=p):p=e[14],p}function J8(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function ej(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function tj(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("mx-2 w-auto bg-sidebar-border",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Eo,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const nj=D.forwardRef((t,e)=>{const n=ve.c(9);let i,o;n[0]!==t?({className:i,...o}=t,n[0]=t,n[1]=i,n[2]=o):(i=n[1],o=n[2]);let l;n[3]!==i?(l=Ee("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",i),n[3]=i,n[4]=l):l=n[4];let u;return n[5]!==o||n[6]!==e||n[7]!==l?(u=g.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,ref:e,...o}),n[5]=o,n[6]=e,n[7]=l,n[8]=u):u=n[8],u});function Kf(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("relative flex w-full min-w-0 flex-col p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Yf(t){const e=ve.c(10);let n,i,o;e[0]!==t?({className:n,asChild:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const u=(o===void 0?!1:o)?Yu:"div";let a;e[4]!==n?(a=Ee("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",n),e[4]=n,e[5]=a):a=e[5];let d;return e[6]!==u||e[7]!==i||e[8]!==a?(d=g.jsx(u,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:a,...i}),e[6]=u,e[7]=i,e[8]=a,e[9]=d):d=e[9],d}function Xf(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("w-full text-sm",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Wl(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex w-full min-w-0 flex-col gap-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Ta(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("group/menu-item relative",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const rj=cc("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ql(t){const e=ve.c(28);let n,i,o,l,u,a,d;e[0]!==t?({asChild:o,isActive:l,variant:u,size:a,tooltip:d,className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u,e[6]=a,e[7]=d):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5],a=e[6],d=e[7]);const f=o===void 0?!1:o,p=l===void 0?!1:l,h=u===void 0?"default":u,y=a===void 0?"default":a,S=f?Yu:"button",{isMobile:C,state:w}=ud();let v;e[8]!==n||e[9]!==y||e[10]!==h?(v=Ee(rj({variant:h,size:y}),n),e[8]=n,e[9]=y,e[10]=h,e[11]=v):v=e[11];let b;e[12]!==S||e[13]!==p||e[14]!==i||e[15]!==y||e[16]!==v?(b=g.jsx(S,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":y,"data-active":p,className:v,...i}),e[12]=S,e[13]=p,e[14]=i,e[15]=y,e[16]=v,e[17]=b):b=e[17];const _=b;if(!d)return _;if(typeof d=="string"){let M;e[18]!==d?(M={children:d},e[18]=d,e[19]=M):M=e[19],d=M}let x;e[20]!==_?(x=g.jsx(Uu,{asChild:!0,children:_}),e[20]=_,e[21]=x):x=e[21];const k=w!=="collapsed"||C;let N;e[22]!==k||e[23]!==d?(N=g.jsx($u,{side:"right",align:"center",hidden:k,...d}),e[22]=k,e[23]=d,e[24]=N):N=e[24];let A;return e[25]!==x||e[26]!==N?(A=g.jsxs(Hu,{children:[x,N]}),e[25]=x,e[26]=N,e[27]=A):A=e[27],A}function ij(t){const e=ve.c(12);let n,i,o,l;e[0]!==t?({className:n,asChild:o,showOnHover:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=o===void 0?!1:o,a=l===void 0?!1:l,d=u?Yu:"button",f=a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0";let p;e[5]!==n||e[6]!==f?(p=Ee("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",f,n),e[5]=n,e[6]=f,e[7]=p):p=e[7];let h;return e[8]!==d||e[9]!==i||e[10]!==p?(h=g.jsx(d,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:p,...i}),e[8]=d,e[9]=i,e[10]=p,e[11]=h):h=e[11],h}function sj(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border pl-2.5 py-0.5 group-data-[collapsible=icon]:hidden",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Mo(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(dA,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=i):i=e[3],i}function jo(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(sS,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Oo(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(oS,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=i):i=e[3],i}function oj(t,e){const n=ve.c(6),[i,o]=D.useState(null),l=D.useRef(!1),u=D.useRef(null);let a,d;n[0]!==e||n[1]!==t?(a=()=>(l.current&&!e&&t&&(o(t),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{o(null),u.current=null},5e3)),l.current=e,()=>{u.current&&clearTimeout(u.current)}),d=[e,t],n[0]=e,n[1]=t,n[2]=a,n[3]=d):(a=n[2],d=n[3]),D.useEffect(a,d);const f=t!==null&&i===t;let p;return n[4]!==f?(p={isFlashing:f},n[4]=f,n[5]=p):p=n[5],p}const Ab=ni.memo(function(e){const n=ve.c(13),{isClosed:i,isEditing:o,onRename:l,onReopen:u,onClose:a,onDelete:d}=e;if(o){let C;return n[0]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx("div",{className:"shrink-0 size-7"}),n[0]=C):C=n[0],C}let f;n[1]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(kC,{asChild:!0,children:g.jsxs(ij,{showOnHover:!0,children:[g.jsx(Fx,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Session actions"})]})}),n[1]=f):f=n[1];let p;n[2]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(G4,{className:"size-4"}),n[2]=p):p=n[2];let h;n[3]!==l?(h=g.jsxs(Tu,{onClick:l,children:[p,"Rename"]}),n[3]=l,n[4]=h):h=n[4];let y;n[5]!==i||n[6]!==a||n[7]!==d||n[8]!==u?(y=i?g.jsxs(g.Fragment,{children:[g.jsxs(Tu,{onClick:u,children:[g.jsx($x,{className:"size-4"}),"Restore"]}),g.jsxs(Tu,{onClick:d,className:"text-destructive focus:text-destructive",children:[g.jsx(ac,{className:"size-4"}),"Delete permanently"]})]}):g.jsxs(Tu,{onClick:a,children:[g.jsx(Ns,{className:"size-4"}),"Archive"]}),n[5]=i,n[6]=a,n[7]=d,n[8]=u,n[9]=y):y=n[9];let S;return n[10]!==h||n[11]!==y?(S=g.jsxs(CC,{children:[f,g.jsxs(EC,{align:"end",children:[h,y]})]}),n[10]=h,n[11]=y,n[12]=S):S=n[12],S}),Rb=ni.memo(function(e){const n=ve.c(4),{status:i,isStreaming:o,runningAt:l}=e;if(o||i==="running"||!!l){let d;return n[0]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(Br,{className:"size-3.5 animate-spin shrink-0"}),n[0]=d):d=n[0],d}if(i==="error"){let d;return n[1]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(ih,{className:"size-3.5 shrink-0"}),n[1]=d):d=n[1],d}if(i==="interrupted"){let d;return n[2]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(Ux,{className:"size-3.5 shrink-0"}),n[2]=d):d=n[2],d}let a;return n[3]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(Gu,{className:"size-3.5 shrink-0"}),n[3]=a):a=n[3],a}),Wg=ni.memo(function t({session:e,allSessions:n,isActive:i,currentSessionId:o,streamingSessionIds:l,pendingPermissions:u,onResumeSession:a,onCloseSession:d,onReopenSession:f,onDeleteSession:p,onRename:h}){const[y,S]=D.useState(!1),[C,w]=D.useState(e.title||""),v=D.useRef(null),b=D.useMemo(()=>n.filter(V=>V.parentId===e.id),[n,e.id]),_=b.length>0,x=e.status==="closed",k=D.useRef(!1);D.useEffect(()=>{y&&v.current?k.current||(v.current.focus(),v.current.select(),k.current=!0):k.current=!1},[y]),D.useEffect(()=>{y||w(e.title||"")},[y,e.title]);const N=()=>{w(e.title||""),S(!0)},A=()=>{const V=C.trim();V&&V!==e.title&&h(e.id,V),S(!1)},M=()=>{S(!1),w(e.title||"")},R=V=>{V.key==="Enter"?(V.preventDefault(),A()):V.key==="Escape"&&(V.preventDefault(),M())},j=D.useMemo(()=>b.some(V=>V.id===o),[b,o]),O=l.has(e.id),B=u.some(V=>V.sessionId===e.id),q=O||e.subagentStatus==="running"||!!e.runningAt,{isFlashing:$}=oj(e.id,q);return _?g.jsx(Gf,{delayDuration:300,children:g.jsx(Mo,{defaultOpen:i||j,className:"group/collapsible",children:g.jsxs(Ta,{children:[g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx(jo,{asChild:!0,children:g.jsx("button",{className:"flex items-center justify-center rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shrink-0 size-7 p-1","aria-label":"Toggle child sessions",children:g.jsx(Ai,{className:"size-4 transition-transform duration-200 [[data-state=open]>&]:rotate-90"})})}),y?g.jsx("input",{ref:v,type:"text",value:C,onChange:V=>w(V.target.value),onKeyDown:R,onBlur:A,"aria-label":`Rename session: ${e.title||"Untitled"}`,className:"flex-1 min-w-0 h-8 px-2 text-sm bg-background border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring"}):g.jsx(Ql,{"data-session-id":e.id,isActive:i,onClick:()=>a(e.id),className:Ee("flex-1 min-w-0",$&&"animate-completion-flash rounded-md"),children:g.jsxs(Hu,{children:[g.jsx(Uu,{asChild:!0,children:g.jsxs("span",{className:"truncate flex items-center gap-2",children:[g.jsx(Rb,{status:e.subagentStatus,isStreaming:O,runningAt:e.runningAt}),B&&g.jsx(Lu,{className:"size-3 text-warning shrink-0 animate-pulse"}),e.title||"Untitled"]})}),g.jsx($u,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(Ab,{isClosed:x,isEditing:y,onRename:N,onReopen:()=>f(e.id),onClose:()=>d(e.id),onDelete:()=>p(e.id)})]}),g.jsx(Oo,{children:g.jsx(sj,{children:b.map(V=>g.jsx(t,{session:V,allSessions:n,isActive:o===V.id,currentSessionId:o,streamingSessionIds:l,pendingPermissions:u,onResumeSession:a,onCloseSession:d,onReopenSession:f,onDeleteSession:p,onRename:h},V.id))})})]})})}):g.jsx(Gf,{delayDuration:300,children:g.jsx(Ta,{children:g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx("div",{className:"shrink-0 size-7 p-1"}),y?g.jsx("input",{ref:v,type:"text",value:C,onChange:V=>w(V.target.value),onKeyDown:R,onBlur:A,"aria-label":`Rename session: ${e.title||"Untitled"}`,className:"flex-1 min-w-0 h-8 px-2 text-sm bg-background border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring"}):g.jsx(Ql,{"data-session-id":e.id,isActive:i,onClick:()=>a(e.id),className:Ee("flex-1 min-w-0",$&&"animate-completion-flash rounded-md"),children:g.jsxs(Hu,{children:[g.jsx(Uu,{asChild:!0,children:g.jsxs("span",{className:"truncate flex items-center gap-2",children:[g.jsx(Rb,{status:e.subagentStatus,isStreaming:O,runningAt:e.runningAt}),B&&g.jsx(Lu,{className:"size-3 text-warning shrink-0 animate-pulse"}),e.title||"Untitled"]})}),g.jsx($u,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(Ab,{isClosed:x,isEditing:y,onRename:N,onReopen:()=>f(e.id),onClose:()=>d(e.id),onDelete:()=>p(e.id)})]})})})}),aj=cc("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Kn(t){const e=ve.c(13);let n,i,o,l;e[0]!==t?({className:n,variant:o,asChild:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=o===void 0?"default":o,d=(l===void 0?!1:l)?Yu:"span";let f;e[5]!==n||e[6]!==u?(f=Ee(aj({variant:u}),n),e[5]=n,e[6]=u,e[7]=f):f=e[7];let p;return e[8]!==d||e[9]!==i||e[10]!==f||e[11]!==u?(p=g.jsx(d,{"data-slot":"badge","data-variant":u,className:f,...i}),e[8]=d,e[9]=i,e[10]=f,e[11]=u,e[12]=p):p=e[12],p}const lj=ni.memo(function(e){const n=ve.c(45),{allSessions:i,currentSession:o,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,favoritedWorkspaceIds:d,workspaces:f,activeWorkspace:p,onSelectWorkspace:h,onResumeSession:y,onCloseSession:S,onReopenSession:C,onDeleteSession:w,onRenameSession:v,onCreateSessionInWorkspace:b,connected:_}=e;let x;if(n[0]!==d||n[1]!==f){const j=new Map(f.map(cj));x=d.map(O=>j.get(O)).filter(uj),n[0]=d,n[1]=f,n[2]=x}else x=n[2];const k=x;let N;if(n[3]!==i||n[4]!==k){N=new Map;for(const j of k){const O=i.filter(B=>B.workspaceId===j.id&&B.status==="active"&&B.parentId===null).sort(dj);N.set(j.id,O)}n[3]=i,n[4]=k,n[5]=N}else N=n[5];const A=N;if(k.length===0){let j;n[6]===Symbol.for("react.memo_cache_sentinel")?(j=g.jsx(Yf,{children:"Overview"}),n[6]=j):j=n[6];let O;return n[7]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsxs(Kf,{children:[j,g.jsx(Xf,{children:g.jsx("div",{className:"px-2 py-8 text-center text-sm text-muted-foreground",children:"Star a workspace to see it here"})})]}),n[7]=O):O=n[7],O}let M;if(n[8]!==(p==null?void 0:p.id)||n[9]!==i||n[10]!==_||n[11]!==(o==null?void 0:o.id)||n[12]!==(o==null?void 0:o.workspaceId)||n[13]!==l||n[14]!==k||n[15]!==S||n[16]!==b||n[17]!==w||n[18]!==v||n[19]!==C||n[20]!==y||n[21]!==h||n[22]!==a||n[23]!==u||n[24]!==A){let j;n[26]!==(p==null?void 0:p.id)||n[27]!==i||n[28]!==_||n[29]!==(o==null?void 0:o.id)||n[30]!==(o==null?void 0:o.workspaceId)||n[31]!==l||n[32]!==S||n[33]!==b||n[34]!==w||n[35]!==v||n[36]!==C||n[37]!==y||n[38]!==h||n[39]!==a||n[40]!==u||n[41]!==A?(j=O=>{const B=O.id===(p==null?void 0:p.id),q=(o==null?void 0:o.workspaceId)===O.id,$=A.get(O.id)||[];return g.jsx(Mo,{defaultOpen:B,className:"group/collapsible",children:g.jsxs(Kf,{children:[g.jsx(Yf,{asChild:!0,children:g.jsxs(jo,{className:"flex items-center justify-between w-full",onClick:()=>h(O),children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ai,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),O.isVirtual?g.jsx(Cg,{className:"size-3.5"}):g.jsx(Ao,{className:"size-3.5"}),g.jsx("span",{className:q?"truncate text-sidebar-foreground font-medium":"truncate",children:O.name})]}),g.jsx(Kn,{variant:"secondary",children:$.length})]})}),g.jsx(Oo,{children:g.jsxs(Xf,{children:[g.jsx(Wl,{children:g.jsx(Ta,{children:g.jsxs(Ql,{onClick:()=>b(O.id),disabled:!_,className:"w-full",children:[g.jsx(oc,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),g.jsx(tj,{}),g.jsx(Wl,{children:$.length===0?g.jsx("div",{className:"px-2 py-1 text-xs text-muted-foreground",children:"(no active sessions)"}):$.map(V=>g.jsx(Wg,{session:V,allSessions:i,isActive:(o==null?void 0:o.id)===V.id,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,onResumeSession:y,onCloseSession:S,onReopenSession:C,onDeleteSession:w,onRename:v},V.id))})]})})]})},O.id)},n[26]=p==null?void 0:p.id,n[27]=i,n[28]=_,n[29]=o==null?void 0:o.id,n[30]=o==null?void 0:o.workspaceId,n[31]=l,n[32]=S,n[33]=b,n[34]=w,n[35]=v,n[36]=C,n[37]=y,n[38]=h,n[39]=a,n[40]=u,n[41]=A,n[42]=j):j=n[42],M=k.map(j),n[8]=p==null?void 0:p.id,n[9]=i,n[10]=_,n[11]=o==null?void 0:o.id,n[12]=o==null?void 0:o.workspaceId,n[13]=l,n[14]=k,n[15]=S,n[16]=b,n[17]=w,n[18]=v,n[19]=C,n[20]=y,n[21]=h,n[22]=a,n[23]=u,n[24]=A,n[25]=M}else M=n[25];let R;return n[43]!==M?(R=g.jsx(g.Fragment,{children:M}),n[43]=M,n[44]=R):R=n[44],R});function cj(t){return[t.id,t]}function uj(t){return t!==void 0}function dj(t,e){return new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}const fj=D.forwardRef((t,e)=>{const n=ve.c(92),{sessions:i,currentSession:o,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,connected:d,workspaces:f,activeWorkspace:p,allSessions:h,viewMode:y,favoritedWorkspaceIds:S,onCreateSession:C,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:_,onRenameSession:x,onSelectWorkspace:k,onCreateVirtualWorkspace:N,onCreatePhysicalWorkspace:A,onDeleteWorkspace:M,onCreateSessionInWorkspace:R,onOpenSettings:j,onOpenMCP:O,onOpenAddServer:B,onServerSwitch:q,onEscape:$}=t,{quickConnections:V,addToQuickConnections:K,removeFromQuickConnections:G,activeServer:Y}=lc();ud();const Q=D.useRef(null),I=D.useRef(null);let L,z;n[0]!==l?(L=()=>{I.current=l},z=[l],n[0]=l,n[1]=L,n[2]=z):(L=n[1],z=n[2]),D.useEffect(L,z);let H;n[3]===Symbol.for("react.memo_cache_sentinel")?(H=()=>{var St;const be=Q.current;if(!be)return;const et=Array.from(be.querySelectorAll('[data-sidebar="menu-button"]'));if(et.length===0){be.focus();return}const at=et.find(Pt=>Pt.getAttribute("data-session-id")===I.current);at?at.focus():(St=et[0])==null||St.focus()},n[3]=H):H=n[3];const F=H;let J,ne;n[4]===Symbol.for("react.memo_cache_sentinel")?(J=()=>({focusSessionPanel:F}),ne=[F],n[4]=J,n[5]=ne):(J=n[4],ne=n[5]),D.useImperativeHandle(e,J,ne);let Z;n[6]!==$?(Z=be=>{var Ft,Gt,$t,Rn,Tn;const et=Q.current;if(!et)return;const at=document.activeElement;if(at instanceof HTMLInputElement||at instanceof HTMLTextAreaElement||at instanceof HTMLElement&&at.contentEditable==="true")return;const St=Array.from(et.querySelectorAll('[data-sidebar="menu-button"]')),Pt=St.indexOf(document.activeElement);e:switch(be.key){case"ArrowDown":{be.preventDefault();const Zt=Pt<St.length-1?Pt+1:0;(Ft=St[Zt])==null||Ft.focus();break e}case"ArrowUp":{be.preventDefault();const Zt=Pt>0?Pt-1:St.length-1;(Gt=St[Zt])==null||Gt.focus();break e}case"ArrowRight":{const Zt=($t=document.activeElement)==null?void 0:$t.parentElement;if(!Zt)break e;const on=Zt.querySelector('button[aria-label="Toggle child sessions"]');if(!on)break e;const Kt=Zt.closest("[data-state]");(Kt==null?void 0:Kt.dataset.state)==="closed"&&(be.preventDefault(),on.click());break e}case"ArrowLeft":{const Zt=(Rn=document.activeElement)==null?void 0:Rn.parentElement;if(!Zt)break e;const on=Zt.querySelector('button[aria-label="Toggle child sessions"]');if(!on)break e;const Kt=Zt.closest("[data-state]");(Kt==null?void 0:Kt.dataset.state)==="open"&&(be.preventDefault(),on.click());break e}case"Enter":{document.activeElement instanceof HTMLButtonElement&&document.activeElement.click();break e}case"Escape":be.preventDefault(),(Tn=document.activeElement)==null||Tn.blur(),$==null||$()}},n[6]=$,n[7]=Z):Z=n[7];const W=Z;let U,te;if(n[8]!==i){const be=i.filter(hj);U=be.filter(pj),te=be.filter(mj),n[8]=i,n[9]=U,n[10]=te}else U=n[9],te=n[10];let ie;n[11]!==U||n[12]!==te?(ie={activeSessions:U,archivedSessions:te},n[11]=U,n[12]=te,n[13]=ie):ie=n[13];const{activeSessions:ae,archivedSessions:se}=ie;let _e;n[14]!==(Y==null?void 0:Y.id)||n[15]!==V?(_e=be=>V.some(et=>et.workspaceId===be&&et.serverId===(Y==null?void 0:Y.id)),n[14]=Y==null?void 0:Y.id,n[15]=V,n[16]=_e):_e=n[16];const Te=_e;let De;n[17]!==Y||n[18]!==K||n[19]!==V||n[20]!==G?(De=(be,et)=>{if(!Y)return;const at=V.find(St=>St.workspaceId===be&&St.serverId===Y.id);at?G(at.id):K(Y.id,Y.name,be,et)},n[17]=Y,n[18]=K,n[19]=V,n[20]=G,n[21]=De):De=n[21];const Ke=De;let Ae;n[22]!==B||n[23]!==q?(Ae=g.jsx(z8,{onOpenAddServer:B,onServerSwitch:q}),n[22]=B,n[23]=q,n[24]=Ae):Ae=n[24];let rt;n[25]!==p||n[26]!==Ke||n[27]!==Te||n[28]!==A||n[29]!==N||n[30]!==M||n[31]!==k||n[32]!==y||n[33]!==f?(rt=y!=="overview"&&g.jsx(I8,{workspaces:f,activeWorkspace:p,onSelectWorkspace:k,onCreateVirtualWorkspace:N,onCreatePhysicalWorkspace:A,isWorkspaceFavorited:Te,onToggleFavorite:Ke,onDeleteWorkspace:M}),n[25]=p,n[26]=Ke,n[27]=Te,n[28]=A,n[29]=N,n[30]=M,n[31]=k,n[32]=y,n[33]=f,n[34]=rt):rt=n[34];let Je;n[35]!==Ae||n[36]!==rt?(Je=g.jsxs("div",{className:"p-2 space-y-2",children:[Ae,rt]}),n[35]=Ae,n[36]=rt,n[37]=Je):Je=n[37];let Qe;n[38]!==d||n[39]!==C||n[40]!==y?(Qe=y!=="overview"&&g.jsx(Wl,{children:g.jsx(Ta,{children:g.jsxs(Ql,{onClick:C,disabled:!d,className:"w-full",children:[g.jsx(oc,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),n[38]=d,n[39]=C,n[40]=y,n[41]=Qe):Qe=n[41];let ot;n[42]!==Je||n[43]!==Qe?(ot=g.jsxs(J8,{children:[Je,Qe]}),n[42]=Je,n[43]=Qe,n[44]=ot):ot=n[44];let ue;n[45]!==ae||n[46]!==p||n[47]!==h||n[48]!==se||n[49]!==d||n[50]!==o||n[51]!==l||n[52]!==S||n[53]!==v||n[54]!==R||n[55]!==_||n[56]!==x||n[57]!==b||n[58]!==w||n[59]!==k||n[60]!==a||n[61]!==i||n[62]!==u||n[63]!==y||n[64]!==f?(ue=y==="overview"?g.jsx(lj,{allSessions:h,currentSession:o,currentSessionId:l,streamingSessionIds:u,favoritedWorkspaceIds:S,workspaces:f,activeWorkspace:p,onSelectWorkspace:k,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:_,onRenameSession:x,onCreateSessionInWorkspace:R,connected:d,pendingPermissions:a}):g.jsxs(g.Fragment,{children:[ae.length>0&&g.jsx(Mo,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(Kf,{children:[g.jsx(Yf,{asChild:!0,children:g.jsxs(jo,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ai,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Active"]}),g.jsx(Kn,{variant:"secondary",children:ae.length})]})}),g.jsx(Oo,{children:g.jsx(Xf,{children:g.jsx(Wl,{children:ae.map(be=>g.jsx(Wg,{session:be,allSessions:i,isActive:(o==null?void 0:o.id)===be.id,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:_,onRename:x},be.id))})})})]})}),se.length>0&&g.jsx(Mo,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(Kf,{children:[g.jsx(Yf,{asChild:!0,children:g.jsxs(jo,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(Ai,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Archived"]}),g.jsx(Kn,{variant:"secondary",children:se.length})]})}),g.jsx(Oo,{children:g.jsx(Xf,{children:g.jsx(Wl,{children:se.map(be=>g.jsx(Wg,{session:be,allSessions:i,isActive:(o==null?void 0:o.id)===be.id,currentSessionId:l,streamingSessionIds:u,pendingPermissions:a,onResumeSession:w,onCloseSession:v,onReopenSession:b,onDeleteSession:_,onRename:x},be.id))})})})]})}),ae.length===0&&se.length===0&&g.jsxs("div",{className:"p-4 text-center text-sm text-muted-foreground",children:["No sessions yet.",g.jsx("br",{}),"Start a new chat to begin."]})]}),n[45]=ae,n[46]=p,n[47]=h,n[48]=se,n[49]=d,n[50]=o,n[51]=l,n[52]=S,n[53]=v,n[54]=R,n[55]=_,n[56]=x,n[57]=b,n[58]=w,n[59]=k,n[60]=a,n[61]=i,n[62]=u,n[63]=y,n[64]=f,n[65]=ue):ue=n[65];let it;n[66]!==W||n[67]!==ue?(it=g.jsx(nj,{ref:Q,tabIndex:-1,onKeyDown:W,className:"outline-none",children:ue}),n[66]=W,n[67]=ue,n[68]=it):it=n[68];let Ze;n[69]!==d?(Ze=d?g.jsx(E5,{className:"size-3.5 text-success"}):g.jsx(Kx,{className:"size-3.5 text-destructive"}),n[69]=d,n[70]=Ze):Ze=n[70];const dt=d?"Connected":"Disconnected";let ce;n[71]!==dt?(ce=g.jsx("span",{className:"text-xs text-muted-foreground",children:dt}),n[71]=dt,n[72]=ce):ce=n[72];let xe;n[73]!==Ze||n[74]!==ce?(xe=g.jsx(Ta,{children:g.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[Ze,ce]})}),n[73]=Ze,n[74]=ce,n[75]=xe):xe=n[75];let pe,Me;n[76]===Symbol.for("react.memo_cache_sentinel")?(pe=g.jsx(Na,{className:"size-4","data-icon":"inline-start"}),Me=g.jsx("span",{children:"MCP Servers"}),n[76]=pe,n[77]=Me):(pe=n[76],Me=n[77]);let Le;n[78]!==O?(Le=g.jsx(Ta,{children:g.jsxs(Ql,{onClick:O,children:[pe,Me]})}),n[78]=O,n[79]=Le):Le=n[79];let nt,je;n[80]===Symbol.for("react.memo_cache_sentinel")?(nt=g.jsx(qx,{className:"size-4","data-icon":"inline-start"}),je=g.jsx("span",{children:"Settings"}),n[80]=nt,n[81]=je):(nt=n[80],je=n[81]);let Ve;n[82]!==j?(Ve=g.jsx(Ta,{children:g.jsx("div",{className:"flex items-center gap-1",children:g.jsxs(Ql,{onClick:j,children:[nt,je]})})}),n[82]=j,n[83]=Ve):Ve=n[83];let ct;n[84]!==xe||n[85]!==Le||n[86]!==Ve?(ct=g.jsx(ej,{className:"pb-4",children:g.jsxs(Wl,{children:[xe,Le,Ve]})}),n[84]=xe,n[85]=Le,n[86]=Ve,n[87]=ct):ct=n[87];let Tt;return n[88]!==ot||n[89]!==it||n[90]!==ct?(Tt=g.jsxs(Z8,{collapsible:"offcanvas",children:[ot,it,ct]}),n[88]=ot,n[89]=it,n[90]=ct,n[91]=Tt):Tt=n[91],Tt});function hj(t){return!t.parentId}function pj(t){return t.status==="active"}function mj(t){return t.status==="closed"}const gj={".ts":{icon:qi,color:"text-blue-500"},".tsx":{icon:qi,color:"text-blue-500"},".js":{icon:qi,color:"text-yellow-500"},".jsx":{icon:qi,color:"text-yellow-500"},".json":{icon:qi,color:"text-yellow-600"},".md":{icon:qi,color:"text-gray-500"},".css":{icon:qi,color:"text-purple-500"},".html":{icon:qi,color:"text-orange-500"}};function zC({entry:t,workspaceId:e,parentPath:n,depth:i,onFileSelect:o,showHidden:l=!0,serverUrl:u,apiToken:a}){const{fetchWithAuth:d}=od(),[f,p]=D.useState(!1),[h,y]=D.useState([]),[S,C]=D.useState(!1),[w,v]=D.useState(!1),b=n?`${n}/${t.path}`:t.path,_=t.type==="directory",x=async()=>{if(!(w||S)){C(!0);try{const O=await(await d(`/api/workspaces/${e}/files?path=${encodeURIComponent(b)}&showHidden=${l}`,{},{serverUrl:u,token:a})).json();y(O.files||[]),v(!0)}catch(j){console.error("Failed to load children:",j)}finally{C(!1)}}},k=j=>{p(j),j&&_&&x()},N=()=>{!_&&o&&o({...t,path:b})},A=t.extension?gj[t.extension]:null,M=_?f?Eg:Ao:(A==null?void 0:A.icon)||qi,R=_?"text-amber-500":(A==null?void 0:A.color)||"text-muted-foreground";return _?g.jsxs(Mo,{open:f,onOpenChange:k,children:[g.jsx(jo,{asChild:!0,children:g.jsxs("button",{className:Ee("flex items-center gap-1.5 w-full min-w-0 overflow-x-hidden px-1.5 py-0.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground","transition-colors text-left"),style:{paddingLeft:`${i*12+6}px`},children:[S?g.jsx(Br,{className:"w-3 h-3 animate-spin shrink-0"}):g.jsx(Ai,{className:Ee("w-3 h-3 shrink-0 transition-transform",f&&"rotate-90")}),g.jsx(M,{className:Ee("w-4 h-4 shrink-0",R)}),g.jsx("span",{className:"truncate min-w-0 flex-1",children:t.name})]})}),g.jsx(Oo,{children:h.map(j=>g.jsx(zC,{entry:j,workspaceId:e,parentPath:b,depth:i+1,onFileSelect:o,showHidden:l,serverUrl:u,apiToken:a},`${b}/${j.path}`))})]}):g.jsxs("button",{onClick:N,className:Ee("flex items-center gap-1.5 w-full min-w-0 overflow-x-hidden px-1.5 py-0.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground","transition-colors text-left"),style:{paddingLeft:`${i*12+6}px`},children:[g.jsx(M,{className:Ee("w-4 h-4 shrink-0",R)}),g.jsx("span",{className:"truncate min-w-0 flex-1",children:t.name})]})}function Tb({workspaceId:t,serverUrl:e,apiToken:n,onFileSelect:i,showHidden:o=!0}){const[l,u]=D.useState([]),[a,d]=D.useState(""),[f,p]=D.useState(!0),[h,y]=D.useState(null),{fetchWithAuth:S}=od(),C=D.useCallback(async()=>{p(!0),y(null);try{const w=await S(`/api/workspaces/${t}/files?showHidden=${o}`,{},{serverUrl:e,token:n}),v=await w.json();if(!w.ok)throw new Error(v.message||"Failed to load files");u(v.files),d(v.currentPath)}catch(w){y(w instanceof Error?w.message:"Failed to load files")}finally{p(!1)}},[t,o,S,e,n]);return D.useEffect(()=>{C()},[C]),f?g.jsxs("div",{className:"flex items-center justify-center h-32 text-muted-foreground",children:[g.jsx(Br,{className:"w-4 h-4 animate-spin mr-2"}),"Loading files..."]}):h?g.jsxs("div",{className:"p-4 text-sm text-destructive",children:[h,g.jsx(ze,{variant:"ghost",size:"sm",onClick:C,className:"ml-2",children:g.jsx(Gl,{className:"w-3 h-3"})})]}):l.length===0?g.jsxs("div",{className:"p-4 text-sm text-muted-foreground",children:["Empty workspace",g.jsx(ze,{variant:"ghost",size:"sm",onClick:C,className:"ml-2",children:g.jsx(Gl,{className:"w-3 h-3"})})]}):g.jsxs("div",{className:"flex flex-col h-full min-w-0 overflow-hidden",children:[g.jsxs("div",{className:"flex items-center justify-between min-w-0 overflow-hidden px-3 py-2",children:[g.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide truncate min-w-0",children:"Files"}),g.jsx(ze,{variant:"ghost",size:"icon",className:"h-5 w-5 shrink-0",onClick:C,children:g.jsx(Gl,{className:"w-3 h-3"})})]}),g.jsx(yc,{className:"flex-1 min-h-0 min-w-0",children:g.jsx("div",{className:"px-2 pb-2 min-w-0 overflow-hidden",children:g.jsx("div",{className:"space-y-0.5",children:l.map(w=>g.jsx(zC,{entry:w,workspaceId:t,parentPath:a,depth:0,onFileSelect:i,showHidden:o,serverUrl:e,apiToken:n},w.path))})})})]})}function vj(t){const e=ve.c(33),{workspaceId:n,searchQuery:i,selectedIndex:o,onSelect:l,onFilesChange:u,showHidden:a,serverUrl:d,apiToken:f}=t,p=a===void 0?!0:a;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[0]=h):h=e[0];const[y,S]=D.useState(h),[C,w]=D.useState(!1),[v,b]=D.useState(i),{fetchWithAuth:_}=od(),x=D.useRef(0);let k,N;e[1]!==i?(k=()=>{const K=setTimeout(()=>{b(i)},300);return()=>clearTimeout(K)},N=[i],e[1]=i,e[2]=k,e[3]=N):(k=e[2],N=e[3]),D.useEffect(k,N);let A,M;if(e[4]!==f||e[5]!==v||e[6]!==_||e[7]!==u||e[8]!==d||e[9]!==p||e[10]!==n?(A=()=>{if(!v||v.length<2){S([]),u([]);return}const K=x.current=x.current+1;w(!0);const G=new AbortController;return _(`/api/workspaces/${n}/files?search=${encodeURIComponent(v)}&showHidden=${p}`,{signal:G.signal},{serverUrl:d,token:f}).then(yj).then(Y=>{if(K!==x.current)return;const Q=Y.files||[];S(Q),u(Q)}).catch(_j).finally(()=>{K===x.current&&w(!1)}),()=>G.abort()},M=[n,v,u,p,_,d,f],e[4]=f,e[5]=v,e[6]=_,e[7]=u,e[8]=d,e[9]=p,e[10]=n,e[11]=A,e[12]=M):(A=e[11],M=e[12]),D.useEffect(A,M),!i||i.length<2){let K;return e[13]===Symbol.for("react.memo_cache_sentinel")?(K=g.jsx("div",{className:"p-2 text-xs text-muted-foreground",children:"Type at least 2 characters to search files..."}),e[13]=K):K=e[13],K}if(C){let K;return e[14]===Symbol.for("react.memo_cache_sentinel")?(K=g.jsxs("div",{className:"flex items-center justify-center p-4 text-muted-foreground",children:[g.jsx(Br,{className:"w-4 h-4 animate-spin mr-2"}),"Searching..."]}),e[14]=K):K=e[14],K}if(y.length===0){let K;return e[15]!==i?(K=g.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No files found matching "',i,'"']}),e[15]=i,e[16]=K):K=e[16],K}let R;if(e[17]!==y||e[18]!==l||e[19]!==o){let K;e[21]!==l||e[22]!==o?(K=(G,Y)=>g.jsxs("button",{onClick:()=>l(G),className:Ee("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",Y===o&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[G.type==="directory"?g.jsx(Ao,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}):g.jsx(qi,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),g.jsx("span",{className:"truncate flex-1",children:G.path}),G.extension&&g.jsx("span",{className:"text-xs text-muted-foreground",children:G.extension})]},G.path),e[21]=l,e[22]=o,e[23]=K):K=e[23],R=y.map(K),e[17]=y,e[18]=l,e[19]=o,e[20]=R}else R=e[20];const j=y.length!==1?"s":"";let O;e[24]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↑↓"}),e[24]=O):O=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[25]=B):B=e[25];let q;e[26]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"}),e[26]=q):q=e[26];let $;e[27]!==y.length||e[28]!==j?($=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[y.length," result",j," •",O," navigate",B," select",q," close"]}),e[27]=y.length,e[28]=j,e[29]=$):$=e[29];let V;return e[30]!==$||e[31]!==R?(V=g.jsxs("div",{className:"p-1",children:[R,$]}),e[30]=$,e[31]=R,e[32]=V):V=e[32],V}function _j(t){t.name!=="AbortError"&&console.error("File search failed:",t)}function yj(t){return t.json()}function bj(t){const e=ve.c(40),{workspaceId:n,serverUrl:i,apiToken:o,isOpen:l,onClose:u}=t,a=cd();if(!n)return null;if(a){let k;e[0]!==u?(k=q=>!q&&u(),e[0]=u,e[1]=k):k=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=g.jsx(zh,{className:"sr-only",children:g.jsx(Ph,{children:"Files"})}),e[2]=N):N=e[2];let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A=g.jsx("span",{className:"font-semibold text-sm",children:"Files"}),e[3]=A):A=e[3];let M;e[4]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx(Ns,{className:"w-4 h-4"}),e[4]=M):M=e[4];let R;e[5]!==u?(R=g.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[A,g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:u,children:M})]}),e[5]=u,e[6]=R):R=e[6];let j;e[7]!==o||e[8]!==i||e[9]!==n?(j=g.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",children:g.jsx(Tb,{workspaceId:n,serverUrl:i,apiToken:o,showHidden:!0},n)}),e[7]=o,e[8]=i,e[9]=n,e[10]=j):j=e[10];let O;e[11]!==R||e[12]!==j?(O=g.jsxs(Bh,{side:"right",className:"w-72 p-0 bg-sidebar [&>button]:hidden",children:[N,R,j]}),e[11]=R,e[12]=j,e[13]=O):O=e[13];let B;return e[14]!==l||e[15]!==k||e[16]!==O?(B=g.jsx(Ih,{open:l,onOpenChange:k,children:O}),e[14]=l,e[15]=k,e[16]=O,e[17]=B):B=e[17],B}const d=!l&&"w-0";let f;e[18]!==d?(f=Ee("relative w-64 bg-transparent transition-[width] duration-200 ease-linear",d),e[18]=d,e[19]=f):f=e[19];let p;e[20]!==f?(p=g.jsx("div",{className:f}),e[20]=f,e[21]=p):p=e[21];const h=!l&&"translate-x-full";let y;e[22]!==h?(y=Ee("fixed right-0 z-10 w-64 bg-sidebar border-l border-border flex flex-col overflow-hidden","transform transition-transform duration-200 ease-linear",h),e[22]=h,e[23]=y):y=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S={top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)",height:"calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0))"},e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx("span",{className:"font-semibold text-sm",children:"Files"}),e[25]=C):C=e[25];let w;e[26]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(Ns,{className:"w-4 h-4"}),e[26]=w):w=e[26];let v;e[27]!==u?(v=g.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[C,g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:u,children:w})]}),e[27]=u,e[28]=v):v=e[28];let b;e[29]!==o||e[30]!==i||e[31]!==n?(b=g.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",children:g.jsx(Tb,{workspaceId:n,serverUrl:i,apiToken:o,showHidden:!0},n)}),e[29]=o,e[30]=i,e[31]=n,e[32]=b):b=e[32];let _;e[33]!==b||e[34]!==y||e[35]!==v?(_=g.jsxs("div",{className:y,style:S,children:[v,b]}),e[33]=b,e[34]=y,e[35]=v,e[36]=_):_=e[36];let x;return e[37]!==_||e[38]!==p?(x=g.jsxs(g.Fragment,{children:[p,_]}),e[37]=_,e[38]=p,e[39]=x):x=e[39],x}var ng={exports:{}},Nb;function xj(){return Nb||(Nb=1,(function(t,e){(function(n,i){t.exports=i()})(globalThis,(()=>(()=>{var n={4567:function(u,a,d){var f=this&&this.__decorate||function(_,x,k,N){var A,M=arguments.length,R=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,x,k,N);else for(var j=_.length-1;j>=0;j--)(A=_[j])&&(R=(M<3?A(R):M>3?A(x,k,R):A(x,k))||R);return M>3&&R&&Object.defineProperty(x,k,R),R},p=this&&this.__param||function(_,x){return function(k,N){x(k,N,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const h=d(9042),y=d(9924),S=d(844),C=d(4725),w=d(2585),v=d(3656);let b=a.AccessibilityManager=class extends S.Disposable{constructor(_,x,k,N){super(),this._terminal=_,this._coreBrowserService=k,this._renderService=N,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let A=0;A<this._terminal.rows;A++)this._rowElements[A]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[A]);if(this._topBoundaryFocusListener=A=>this._handleBoundaryFocus(A,0),this._bottomBoundaryFocusListener=A=>this._handleBoundaryFocus(A,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new y.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((A=>this._handleResize(A.rows)))),this.register(this._terminal.onRender((A=>this._refreshRows(A.start,A.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((A=>this._handleChar(A)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
507
|
+
`)))),this.register(this._terminal.onA11yTab((A=>this._handleTab(A)))),this.register(this._terminal.onKey((A=>this._handleKey(A.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,S.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(_){for(let x=0;x<_;x++)this._handleChar(" ")}_handleChar(_){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==_&&(this._charsToAnnounce+=_):this._charsToAnnounce+=_,_===`
|
|
508
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(_){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(_)||this._charsToConsume.push(_)}_refreshRows(_,x){this._liveRegionDebouncer.refresh(_,x,this._terminal.rows)}_renderRows(_,x){const k=this._terminal.buffer,N=k.lines.length.toString();for(let A=_;A<=x;A++){const M=k.lines.get(k.ydisp+A),R=[],j=(M==null?void 0:M.translateToString(!0,void 0,void 0,R))||"",O=(k.ydisp+A+1).toString(),B=this._rowElements[A];B&&(j.length===0?(B.innerText=" ",this._rowColumns.set(B,[0,1])):(B.textContent=j,this._rowColumns.set(B,R)),B.setAttribute("aria-posinset",O),B.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(_,x){const k=_.target,N=this._rowElements[x===0?1:this._rowElements.length-2];if(k.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||_.relatedTarget!==N)return;let A,M;if(x===0?(A=k,M=this._rowElements.pop(),this._rowContainer.removeChild(M)):(A=this._rowElements.shift(),M=k,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),M.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const R=this._createAccessibilityTreeNode();this._rowElements.unshift(R),this._rowContainer.insertAdjacentElement("afterbegin",R)}else{const R=this._createAccessibilityTreeNode();this._rowElements.push(R),this._rowContainer.appendChild(R)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),_.preventDefault(),_.stopImmediatePropagation()}_handleSelectionChange(){var j,O;if(this._rowElements.length===0)return;const _=document.getSelection();if(!_)return;if(_.isCollapsed)return void(this._rowContainer.contains(_.anchorNode)&&this._terminal.clearSelection());if(!_.anchorNode||!_.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:_.anchorNode,offset:_.anchorOffset},k={node:_.focusNode,offset:_.focusOffset};if((x.node.compareDocumentPosition(k.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===k.node&&x.offset>k.offset)&&([x,k]=[k,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.node))return;const N=this._rowElements.slice(-1)[0];if(k.node.compareDocumentPosition(N)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(k={node:N,offset:(O=(j=N.textContent)==null?void 0:j.length)!=null?O:0}),!this._rowContainer.contains(k.node))return;const A=({node:B,offset:q})=>{const $=B instanceof Text?B.parentNode:B;let V=parseInt($==null?void 0:$.getAttribute("aria-posinset"),10)-1;if(isNaN(V))return console.warn("row is invalid. Race condition?"),null;const K=this._rowColumns.get($);if(!K)return console.warn("columns is null. Race condition?"),null;let G=q<K.length?K[q]:K.slice(-1)[0]+1;return G>=this._terminal.cols&&(++V,G=0),{row:V,column:G}},M=A(x),R=A(k);if(M&&R){if(M.row>R.row||M.row===R.row&&M.column>=R.column)throw new Error("invalid range");this._terminal.select(M.column,M.row,(R.row-M.row)*this._terminal.cols-M.column+R.column)}}_handleResize(_){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);for(;this._rowElements.length>_;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const _=this._coreBrowserService.mainDocument.createElement("div");return _.setAttribute("role","listitem"),_.tabIndex=-1,this._refreshRowDimensions(_),_}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let _=0;_<this._terminal.rows;_++)this._refreshRowDimensions(this._rowElements[_])}}_refreshRowDimensions(_){_.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=b=f([p(1,w.IInstantiationService),p(2,C.ICoreBrowserService),p(3,C.IRenderService)],b)},3614:(u,a)=>{function d(y){return y.replace(/\r?\n/g,"\r")}function f(y,S){return S?"\x1B[200~"+y+"\x1B[201~":y}function p(y,S,C,w){y=f(y=d(y),C.decPrivateModes.bracketedPasteMode&&w.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(y,!0),S.value=""}function h(y,S,C){const w=C.getBoundingClientRect(),v=y.clientX-w.left-10,b=y.clientY-w.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${v}px`,S.style.top=`${b}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=d,a.bracketTextForPaste=f,a.copyHandler=function(y,S){y.clipboardData&&y.clipboardData.setData("text/plain",S.selectionText),y.preventDefault()},a.handlePasteEvent=function(y,S,C,w){y.stopPropagation(),y.clipboardData&&p(y.clipboardData.getData("text/plain"),S,C,w)},a.paste=p,a.moveTextAreaUnderMouseCursor=h,a.rightClickHandler=function(y,S,C,w,v){h(y,S,C),v&&w.rightClickSelect(y),S.value=w.selectionText,S.select()}},7239:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const f=d(1505);a.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(p,h,y){this._css.set(p,h,y)}getCss(p,h){return this._css.get(p,h)}setColor(p,h,y){this._color.set(p,h,y)}getColor(p,h){return this._color.get(p,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,f,p,h){d.addEventListener(f,p,h);let y=!1;return{dispose:()=>{y||(y=!0,d.removeEventListener(f,p,h))}}}},3551:function(u,a,d){var f=this&&this.__decorate||function(b,_,x,k){var N,A=arguments.length,M=A<3?_:k===null?k=Object.getOwnPropertyDescriptor(_,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,_,x,k);else for(var R=b.length-1;R>=0;R--)(N=b[R])&&(M=(A<3?N(M):A>3?N(_,x,M):N(_,x))||M);return A>3&&M&&Object.defineProperty(_,x,M),M},p=this&&this.__param||function(b,_){return function(x,k){_(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const h=d(3656),y=d(8460),S=d(844),C=d(2585),w=d(4725);let v=a.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(b,_,x,k,N){super(),this._element=b,this._mouseService=_,this._renderService=x,this._bufferService=k,this._linkProviderService=N,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new y.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new y.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)((()=>{var A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const _=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!_)return;this._isMouseOut=!1;const x=b.composedPath();for(let k=0;k<x.length;k++){const N=x[k];if(N.classList.contains("xterm"))break;if(N.classList.contains("xterm-hover"))return}this._lastBufferCell&&_.x===this._lastBufferCell.x&&_.y===this._lastBufferCell.y||(this._handleHover(_),this._lastBufferCell=_)}_handleHover(b){if(this._activeLine!==b.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(b,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,b)||(this._clearCurrentLink(),this._askForLink(b,!0))}_askForLink(b,_){var k,N;this._activeProviderReplies&&_||((k=this._activeProviderReplies)==null||k.forEach((A=>{A==null||A.forEach((M=>{M.link.dispose&&M.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let x=!1;for(const[A,M]of this._linkProviderService.linkProviders.entries())_?(N=this._activeProviderReplies)!=null&&N.get(A)&&(x=this._checkLinkProviderResult(A,b,x)):M.provideLinks(b.y,(R=>{var O,B;if(this._isMouseOut)return;const j=R==null?void 0:R.map((q=>({link:q})));(O=this._activeProviderReplies)==null||O.set(A,j),x=this._checkLinkProviderResult(A,b,x),((B=this._activeProviderReplies)==null?void 0:B.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,_){const x=new Set;for(let k=0;k<_.size;k++){const N=_.get(k);if(N)for(let A=0;A<N.length;A++){const M=N[A],R=M.link.range.start.y<b?0:M.link.range.start.x,j=M.link.range.end.y>b?this._bufferService.cols:M.link.range.end.x;for(let O=R;O<=j;O++){if(x.has(O)){N.splice(A--,1);break}x.add(O)}}}}_checkLinkProviderResult(b,_,x){var A;if(!this._activeProviderReplies)return x;const k=this._activeProviderReplies.get(b);let N=!1;for(let M=0;M<b;M++)this._activeProviderReplies.has(M)&&!this._activeProviderReplies.get(M)||(N=!0);if(!N&&k){const M=k.find((R=>this._linkAtPosition(R.link,_)));M&&(x=!0,this._handleNewLink(M))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let M=0;M<this._activeProviderReplies.size;M++){const R=(A=this._activeProviderReplies.get(M))==null?void 0:A.find((j=>this._linkAtPosition(j.link,_)));if(R){x=!0,this._handleNewLink(R);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const _=this._positionFromMouseEvent(b,this._element,this._mouseService);_&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,_)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,_){this._currentLink&&this._lastMouseEvent&&(!b||!_||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=_)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const _=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_&&this._linkAtPosition(b.link,_)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var x,k;return(k=(x=this._currentLink)==null?void 0:x.state)==null?void 0:k.decorations.pointerCursor},set:x=>{var k;(k=this._currentLink)!=null&&k.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,k;return(k=(x=this._currentLink)==null?void 0:x.state)==null?void 0:k.decorations.underline},set:x=>{var k,N,A;(k=this._currentLink)!=null&&k.state&&((A=(N=this._currentLink)==null?void 0:N.state)==null?void 0:A.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const k=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=k&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(k,N),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(b,_,x){var k;(k=this._currentLink)!=null&&k.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(_,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),_.hover&&_.hover(x,_.text)}_fireUnderlineEvent(b,_){const x=b.range,k=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-k-1,x.end.x,x.end.y-k-1,void 0);(_?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,_,x){var k;(k=this._currentLink)!=null&&k.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(_,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),_.leave&&_.leave(x,_.text)}_linkAtPosition(b,_){const x=b.range.start.y*this._bufferService.cols+b.range.start.x,k=b.range.end.y*this._bufferService.cols+b.range.end.x,N=_.y*this._bufferService.cols+_.x;return x<=N&&N<=k}_positionFromMouseEvent(b,_,x){const k=x.getCoords(b,_,this._bufferService.cols,this._bufferService.rows);if(k)return{x:k[0],y:k[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,_,x,k,N){return{x1:b,y1:_,x2:x,y2:k,cols:this._bufferService.cols,fg:N}}};a.Linkifier=v=f([p(1,w.IMouseService),p(2,w.IRenderService),p(3,C.IBufferService),p(4,w.ILinkProviderService)],v)},9042:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(u,a,d){var f=this&&this.__decorate||function(w,v,b,_){var x,k=arguments.length,N=k<3?v:_===null?_=Object.getOwnPropertyDescriptor(v,b):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,_);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(v,b,N):x(v,b))||N);return k>3&&N&&Object.defineProperty(v,b,N),N},p=this&&this.__param||function(w,v){return function(b,_){v(b,_,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const h=d(511),y=d(2585);let S=a.OscLinkProvider=class{constructor(w,v,b){this._bufferService=w,this._optionsService=v,this._oscLinkService=b}provideLinks(w,v){var j;const b=this._bufferService.buffer.lines.get(w-1);if(!b)return void v(void 0);const _=[],x=this._optionsService.rawOptions.linkHandler,k=new h.CellData,N=b.getTrimmedLength();let A=-1,M=-1,R=!1;for(let O=0;O<N;O++)if(M!==-1||b.hasContent(O)){if(b.loadCell(O,k),k.hasExtendedAttrs()&&k.extended.urlId){if(M===-1){M=O,A=k.extended.urlId;continue}R=k.extended.urlId!==A}else M!==-1&&(R=!0);if(R||M!==-1&&O===N-1){const B=(j=this._oscLinkService.getLinkData(A))==null?void 0:j.uri;if(B){const q={start:{x:M+1,y:w},end:{x:O+(R||O!==N-1?0:1),y:w}};let $=!1;if(!(x!=null&&x.allowNonHttpProtocols))try{const V=new URL(B);["http:","https:"].includes(V.protocol)||($=!0)}catch{$=!0}$||_.push({text:B,range:q,activate:(V,K)=>x?x.activate(V,K,q):C(0,K),hover:(V,K)=>{var G;return(G=x==null?void 0:x.hover)==null?void 0:G.call(x,V,K,q)},leave:(V,K)=>{var G;return(G=x==null?void 0:x.leave)==null?void 0:G.call(x,V,K,q)}})}R=!1,k.hasExtendedAttrs()&&k.extended.urlId?(M=O,A=k.extended.urlId):(M=-1,A=-1)}}v(_)}};function C(w,v){if(confirm(`Do you want to navigate to ${v}?
|
|
509
|
+
|
|
510
|
+
WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=S=f([p(0,y.IBufferService),p(1,y.IOptionsService),p(2,y.IOscLinkService)],S)},6193:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(d,f){this._renderCallback=d,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(d,f,p){this._rowCount=p,d=d!==void 0?d:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const d=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},3236:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const f=d(3614),p=d(3656),h=d(3551),y=d(9042),S=d(3730),C=d(1680),w=d(3107),v=d(5744),b=d(2950),_=d(1296),x=d(428),k=d(4269),N=d(5114),A=d(8934),M=d(3230),R=d(9312),j=d(4725),O=d(6731),B=d(8055),q=d(8969),$=d(8460),V=d(844),K=d(6114),G=d(8437),Y=d(2584),Q=d(7399),I=d(5941),L=d(9074),z=d(2585),H=d(5435),F=d(4567),J=d(779);class ne extends q.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(W={}){super(W),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new $.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new $.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new $.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new $.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new $.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new $.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new $.EventEmitter),this._onBlur=this.register(new $.EventEmitter),this._onA11yCharEmitter=this.register(new $.EventEmitter),this._onA11yTabEmitter=this.register(new $.EventEmitter),this._onWillOpen=this.register(new $.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(J.LinkProviderService),this._instantiationService.setService(j.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((U,te)=>this.refresh(U,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((U=>this._reportWindowsOptions(U)))),this.register(this._inputHandler.onColor((U=>this._handleColorEvent(U)))),this.register((0,$.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,$.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((U=>this._afterResize(U.cols,U.rows)))),this.register((0,V.toDisposable)((()=>{var U,te;this._customKeyEventHandler=void 0,(te=(U=this.element)==null?void 0:U.parentNode)==null||te.removeChild(this.element)})))}_handleColorEvent(W){if(this._themeService)for(const U of W){let te,ie="";switch(U.index){case 256:te="foreground",ie="10";break;case 257:te="background",ie="11";break;case 258:te="cursor",ie="12";break;default:te="ansi",ie="4;"+U.index}switch(U.type){case 0:const ae=B.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[U.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${ie};${(0,I.toRgbString)(ae)}${Y.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((se=>se.ansi[U.index]=B.channels.toColor(...U.color)));else{const se=te;this._themeService.modifyColors((_e=>_e[se]=B.channels.toColor(...U.color)))}break;case 2:this._themeService.restoreColor(U.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(W){W?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(W){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var W;return(W=this.textarea)==null?void 0:W.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const W=this.buffer.ybase+this.buffer.y,U=this.buffer.lines.get(W);if(!U)return;const te=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ae=U.getWidth(te),se=this._renderService.dimensions.css.cell.width*ae,_e=this.buffer.y*this._renderService.dimensions.css.cell.height,Te=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Te+"px",this.textarea.style.top=_e+"px",this.textarea.style.width=se+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(U=>{this.hasSelection()&&(0,f.copyHandler)(U,this._selectionService)})));const W=U=>(0,f.handlePasteEvent)(U,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",W)),this.register((0,p.addDisposableDomListener)(this.element,"paste",W)),K.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(U=>{U.button===2&&(0,f.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(U=>{(0,f.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(U=>{U.button===1&&(0,f.moveTextAreaUnderMouseCursor)(U,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(W=>this._keyUp(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(W=>this._keyDown(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(W=>this._keyPress(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(W=>this._compositionHelper.compositionupdate(W)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(W=>this._inputEvent(W)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(W){var te,ie,ae;if(!W)throw new Error("Terminal requires a parent element.");if(W.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((te=this.element)==null?void 0:te.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=W.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),W.appendChild(this.element);const U=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",(se=>this.updateCursorStyle(se)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",y.promptLabel),K.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(N.CoreBrowserService,this.textarea,(ie=W.ownerDocument.defaultView)!=null?ie:window,((ae=this._document)!=null?ae:typeof window<"u")?window.document:null)),this._instantiationService.setService(j.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(se=>this._handleTextAreaFocus(se)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(j.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(j.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(k.CharacterJoinerService),this._instantiationService.setService(j.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(M.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(j.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((se=>this._onRender.fire(se)))),this.onResize((se=>this._renderService.resize(se.cols,se.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(j.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(U);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(C.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(R.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(j.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((se=>this._renderService.handleSelectionChanged(se.start,se.end,se.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((se=>{this.textarea.value=se,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((se=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(w.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(se=>this._selectionService.handleMouseDown(se)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(se=>this._handleScreenReaderModeOptionChange(se)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(se=>{!this._overviewRulerRenderer&&se&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(_.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const W=this,U=this.element;function te(se){const _e=W._mouseService.getMouseReportCoords(se,W.screenElement);if(!_e)return!1;let Te,De;switch(se.overrideType||se.type){case"mousemove":De=32,se.buttons===void 0?(Te=3,se.button!==void 0&&(Te=se.button<3?se.button:3)):Te=1&se.buttons?0:4&se.buttons?1:2&se.buttons?2:3;break;case"mouseup":De=0,Te=se.button<3?se.button:3;break;case"mousedown":De=1,Te=se.button<3?se.button:3;break;case"wheel":if(W._customWheelEventHandler&&W._customWheelEventHandler(se)===!1||W.viewport.getLinesScrolled(se)===0)return!1;De=se.deltaY<0?0:1,Te=4;break;default:return!1}return!(De===void 0||Te===void 0||Te>4)&&W.coreMouseService.triggerMouseEvent({col:_e.col,row:_e.row,x:_e.x,y:_e.y,button:Te,action:De,ctrl:se.ctrlKey,alt:se.altKey,shift:se.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ae={mouseup:se=>(te(se),se.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(se)),wheel:se=>(te(se),this.cancel(se,!0)),mousedrag:se=>{se.buttons&&te(se)},mousemove:se=>{se.buttons||te(se)}};this.register(this.coreMouseService.onProtocolChange((se=>{se?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(se)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&se?ie.mousemove||(U.addEventListener("mousemove",ae.mousemove),ie.mousemove=ae.mousemove):(U.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&se?ie.wheel||(U.addEventListener("wheel",ae.wheel,{passive:!1}),ie.wheel=ae.wheel):(U.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&se?ie.mouseup||(ie.mouseup=ae.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&se?ie.mousedrag||(ie.mousedrag=ae.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(U,"mousedown",(se=>{if(se.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(se))return te(se),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(se)}))),this.register((0,p.addDisposableDomListener)(U,"wheel",(se=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(se)===!1)return!1;if(!this.buffer.hasScrollback){const _e=this.viewport.getLinesScrolled(se);if(_e===0)return;const Te=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(se.deltaY<0?"A":"B");let De="";for(let Ke=0;Ke<Math.abs(_e);Ke++)De+=Te;return this.coreService.triggerDataEvent(De,!0),this.cancel(se,!0)}return this.viewport.handleWheel(se)?this.cancel(se):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(U,"touchstart",(se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(se),this.cancel(se)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(U,"touchmove",(se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(se)?void 0:this.cancel(se)}),{passive:!1}))}refresh(W,U){var te;(te=this._renderService)==null||te.refreshRows(W,U)}updateCursorStyle(W){var U;(U=this._selectionService)!=null&&U.shouldColumnSelect(W)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(W,U,te=0){var ie;te===1?(super.scrollLines(W,U,te),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(W)}paste(W){(0,f.paste)(W,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(W){this._customKeyEventHandler=W}attachCustomWheelEventHandler(W){this._customWheelEventHandler=W}registerLinkProvider(W){return this._linkProviderService.registerLinkProvider(W)}registerCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const U=this._characterJoinerService.register(W);return this.refresh(0,this.rows-1),U}deregisterCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(W)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(W){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+W)}registerDecoration(W){return this._decorationService.registerDecoration(W)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(W,U,te){this._selectionService.setSelection(W,U,te)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var W;(W=this._selectionService)==null||W.clearSelection()}selectAll(){var W;(W=this._selectionService)==null||W.selectAll()}selectLines(W,U){var te;(te=this._selectionService)==null||te.selectLines(W,U)}_keyDown(W){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;const U=this.browser.isMac&&this.options.macOptionIsMeta&&W.altKey;if(!U&&!this._compositionHelper.keydown(W))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;U||W.key!=="Dead"&&W.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,Q.evaluateKeyboardEvent)(W,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(W),te.type===3||te.type===2){const ie=this.rows-1;return this.scrollLines(te.type===2?-ie:ie),this.cancel(W,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,W)||(te.cancel&&this.cancel(W,!0),!te.key||!!(W.key&&!W.ctrlKey&&!W.altKey&&!W.metaKey&&W.key.length===1&&W.key.charCodeAt(0)>=65&&W.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(te.key!==Y.C0.ETX&&te.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||W.altKey||W.ctrlKey?this.cancel(W,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(W,U){const te=W.isMac&&!this.options.macOptionIsMeta&&U.altKey&&!U.ctrlKey&&!U.metaKey||W.isWindows&&U.altKey&&U.ctrlKey&&!U.metaKey||W.isWindows&&U.getModifierState("AltGraph");return U.type==="keypress"?te:te&&(!U.keyCode||U.keyCode>47)}_keyUp(W){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1||((function(U){return U.keyCode===16||U.keyCode===17||U.keyCode===18})(W)||this.focus(),this.updateCursorStyle(W),this._keyPressHandled=!1)}_keyPress(W){let U;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;if(this.cancel(W),W.charCode)U=W.charCode;else if(W.which===null||W.which===void 0)U=W.keyCode;else{if(W.which===0||W.charCode===0)return!1;U=W.which}return!(!U||(W.altKey||W.ctrlKey||W.metaKey)&&!this._isThirdLevelShift(this.browser,W)||(U=String.fromCharCode(U),this._onKey.fire({key:U,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(U,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(W){if(W.data&&W.inputType==="insertText"&&(!W.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const U=W.data;return this.coreService.triggerDataEvent(U,!0),this.cancel(W),!0}return!1}resize(W,U){W!==this.cols||U!==this.rows?super.resize(W,U):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(W,U){var te,ie;(te=this._charSizeService)==null||te.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var W;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let U=1;U<this.rows;U++)this.buffer.lines.push(this.buffer.getBlankLine(G.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(W=this.viewport)==null||W.reset(),this.refresh(0,this.rows-1)}}reset(){var U,te;this.options.rows=this.rows,this.options.cols=this.cols;const W=this._customKeyEventHandler;this._setup(),super.reset(),(U=this._selectionService)==null||U.reset(),this._decorationService.reset(),(te=this.viewport)==null||te.reset(),this._customKeyEventHandler=W,this.refresh(0,this.rows-1)}clearTextureAtlas(){var W;(W=this._renderService)==null||W.clearTextureAtlas()}_reportFocus(){var W;(W=this.element)!=null&&W.classList.contains("focus")?this.coreService.triggerDataEvent(Y.C0.ESC+"[I"):this.coreService.triggerDataEvent(Y.C0.ESC+"[O")}_reportWindowsOptions(W){if(this._renderService)switch(W){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const U=this._renderService.dimensions.css.canvas.width.toFixed(0),te=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[4;${te};${U}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),ae=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[6;${ae};${ie}t`)}}cancel(W,U){if(this.options.cancelEvents||U)return W.preventDefault(),W.stopPropagation(),!1}}a.Terminal=ne},9924:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(d,f=1e3){this._renderCallback=d,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,f,p){this._rowCount=p,d=d!==void 0?d:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const y=h-this._lastRefreshMs,S=this._debounceThresholdMS-y;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const d=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,f)}}},1680:function(u,a,d){var f=this&&this.__decorate||function(b,_,x,k){var N,A=arguments.length,M=A<3?_:k===null?k=Object.getOwnPropertyDescriptor(_,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,_,x,k);else for(var R=b.length-1;R>=0;R--)(N=b[R])&&(M=(A<3?N(M):A>3?N(_,x,M):N(_,x))||M);return A>3&&M&&Object.defineProperty(_,x,M),M},p=this&&this.__param||function(b,_){return function(x,k){_(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const h=d(3656),y=d(4725),S=d(8460),C=d(844),w=d(2585);let v=a.Viewport=class extends C.Disposable{constructor(b,_,x,k,N,A,M,R){super(),this._viewportElement=b,this._scrollArea=_,this._bufferService=x,this._optionsService=k,this._charSizeService=N,this._renderService=A,this._coreBrowserService=M,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((j=>this._activeBuffer=j.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((j=>this._renderDimensions=j))),this._handleThemeChange(R.colors),this.register(R.onChangeColors((j=>this._handleThemeChange(j)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(b){if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const _=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==_&&(this._lastRecordedBufferHeight=_,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const _=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(b,_){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(_<0&&this._viewportElement.scrollTop!==0||_>0&&x<this._lastRecordedBufferHeight)||(b.cancelable&&b.preventDefault(),!1)}handleWheel(b){const _=this._getPixelsScrolled(b);return _!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+_:this._smoothScrollState.target+=_,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=_,this._bubbleScroll(b,_))}scrollLines(b){if(b!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const _=b*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+_,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:b,suppressScrollEvent:!1})}_getPixelsScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let _=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_LINE?_*=this._currentRowHeight:b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(_*=this._currentRowHeight*this._bufferService.rows),_}getBufferElements(b,_){var R;let x,k="";const N=[],A=_!=null?_:this._bufferService.buffer.lines.length,M=this._bufferService.buffer.lines;for(let j=b;j<A;j++){const O=M.get(j);if(!O)continue;const B=(R=M.get(j+1))==null?void 0:R.isWrapped;if(k+=O.translateToString(!B),!B||j===M.length-1){const q=document.createElement("div");q.textContent=k,N.push(q),k.length>0&&(x=q),k=""}}return{bufferElements:N,cursorElement:x}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let _=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(_/=this._currentRowHeight+0,this._wheelPartialScroll+=_,_=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(_*=this._bufferService.rows),_}_applyScrollModifier(b,_){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&_.altKey||x==="ctrl"&&_.ctrlKey||x==="shift"&&_.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const _=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,_!==0&&(this._viewportElement.scrollTop+=_,this._bubbleScroll(b,_))}};a.Viewport=v=f([p(2,w.IBufferService),p(3,w.IOptionsService),p(4,y.ICharSizeService),p(5,y.IRenderService),p(6,y.ICoreBrowserService),p(7,y.IThemeService)],v)},3107:function(u,a,d){var f=this&&this.__decorate||function(w,v,b,_){var x,k=arguments.length,N=k<3?v:_===null?_=Object.getOwnPropertyDescriptor(v,b):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,_);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(v,b,N):x(v,b))||N);return k>3&&N&&Object.defineProperty(v,b,N),N},p=this&&this.__param||function(w,v){return function(b,_){v(b,_,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const h=d(4725),y=d(844),S=d(2585);let C=a.BufferDecorationRenderer=class extends y.Disposable{constructor(w,v,b,_,x){super(),this._screenElement=w,this._bufferService=v,this._coreBrowserService=b,this._decorationService=_,this._renderService=x,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((k=>this._removeDecoration(k)))),this.register((0,y.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const w of this._decorationService.decorations)this._renderDecoration(w);this._dimensionsChanged=!1}_renderDecoration(w){this._refreshStyle(w),this._dimensionsChanged&&this._refreshXPosition(w)}_createElement(w){var _,x;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((_=w==null?void 0:w.options)==null?void 0:_.layer)==="top"),v.style.width=`${Math.round((w.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(w.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(w.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=(x=w.options.x)!=null?x:0;return b&&b>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(w,v),v}_refreshStyle(w){const v=w.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)w.element&&(w.element.style.display="none",w.onRenderEmitter.fire(w.element));else{let b=this._decorationElements.get(w);b||(b=this._createElement(w),w.element=b,this._decorationElements.set(w,b),this._container.appendChild(b),w.onDispose((()=>{this._decorationElements.delete(w),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",w.onRenderEmitter.fire(b)}}_refreshXPosition(w,v=w.element){var _;if(!v)return;const b=(_=w.options.x)!=null?_:0;(w.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(w){var v;(v=this._decorationElements.get(w))==null||v.remove(),this._decorationElements.delete(w),w.dispose()}};a.BufferDecorationRenderer=C=f([p(1,S.IBufferService),p(2,h.ICoreBrowserService),p(3,S.IDecorationService),p(4,h.IRenderService)],C)},5871:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(d){if(d.options.overviewRulerOptions){for(const f of this._zones)if(f.color===d.options.overviewRulerOptions.color&&f.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,d.marker.line))return;if(this._lineAdjacentToZone(f,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(f,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,f){return f>=d.startBufferLine&&f<=d.endBufferLine}_lineAdjacentToZone(d,f,p){return f>=d.startBufferLine-this._linePadding[p||"full"]&&f<=d.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(d,f){d.startBufferLine=Math.min(d.startBufferLine,f),d.endBufferLine=Math.max(d.endBufferLine,f)}}},5744:function(u,a,d){var f=this&&this.__decorate||function(x,k,N,A){var M,R=arguments.length,j=R<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,N):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,k,N,A);else for(var O=x.length-1;O>=0;O--)(M=x[O])&&(j=(R<3?M(j):R>3?M(k,N,j):M(k,N))||j);return R>3&&j&&Object.defineProperty(k,N,j),j},p=this&&this.__param||function(x,k){return function(N,A){k(N,A,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const h=d(5871),y=d(4725),S=d(844),C=d(2585),w={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let _=a.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,k,N,A,M,R,j){var B;super(),this._viewportElement=x,this._screenElement=k,this._bufferService=N,this._decorationService=A,this._renderService=M,this._optionsService=R,this._coreBrowserService=j,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(B=this._viewportElement.parentElement)==null||B.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)((()=>{var q;(q=this._canvas)==null||q.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const x=Math.floor(this._canvas.width/3),k=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=x,v.center=k,v.right=x,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){w.full=Math.round(2*this._coreBrowserService.dpr);const x=this._canvas.height/this._bufferService.buffer.lines.length,k=Math.round(Math.max(Math.min(x,12),6)*this._coreBrowserService.dpr);w.left=k,w.center=k,w.right=k}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const k of this._decorationService.decorations)this._colorZoneStore.addDecoration(k);this._ctx.lineWidth=1;const x=this._colorZoneStore.zones;for(const k of x)k.position!=="full"&&this._renderColorZone(k);for(const k of x)k.position==="full"&&this._renderColorZone(k);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(b[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-w[x.position||"full"]/2),v[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+w[x.position||"full"]))}_queueRefresh(x,k){this._shouldUpdateDimensions=x||this._shouldUpdateDimensions,this._shouldUpdateAnchor=k||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=_=f([p(2,C.IBufferService),p(3,C.IDecorationService),p(4,y.IRenderService),p(5,C.IOptionsService),p(6,y.ICoreBrowserService)],_)},2950:function(u,a,d){var f=this&&this.__decorate||function(w,v,b,_){var x,k=arguments.length,N=k<3?v:_===null?_=Object.getOwnPropertyDescriptor(v,b):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,v,b,_);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(k<3?x(N):k>3?x(v,b,N):x(v,b))||N);return k>3&&N&&Object.defineProperty(v,b,N),N},p=this&&this.__param||function(w,v){return function(b,_){v(b,_,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const h=d(4725),y=d(2585),S=d(2584);let C=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(w,v,b,_,x,k){this._textarea=w,this._compositionView=v,this._bufferService=b,this._optionsService=_,this._coreService=x,this._renderService=k,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(w){this._compositionView.textContent=w.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(w){if(this._isComposing||this._isSendingComposition){if(w.keyCode===229||w.keyCode===16||w.keyCode===17||w.keyCode===18)return!1;this._finalizeComposition(!1)}return w.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(w){if(this._compositionView.classList.remove("active"),this._isComposing=!1,w){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const w=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,b=v.replace(w,"");this._dataAlreadySent=b,v.length>w.length?this._coreService.triggerDataEvent(b,!0):v.length<w.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):v.length===w.length&&v!==w&&this._coreService.triggerDataEvent(v,!0)}}),0)}updateCompositionElements(w){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const v=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),b=this._renderService.dimensions.css.cell.height,_=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,x=v*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=x+"px",this._compositionView.style.top=_+"px",this._compositionView.style.height=b+"px",this._compositionView.style.lineHeight=b+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const k=this._compositionView.getBoundingClientRect();this._textarea.style.left=x+"px",this._textarea.style.top=_+"px",this._textarea.style.width=Math.max(k.width,1)+"px",this._textarea.style.height=Math.max(k.height,1)+"px",this._textarea.style.lineHeight=k.height+"px"}w||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=C=f([p(2,y.IBufferService),p(3,y.IOptionsService),p(4,y.ICoreService),p(5,h.IRenderService)],C)},9806:(u,a)=>{function d(f,p,h){const y=h.getBoundingClientRect(),S=f.getComputedStyle(h),C=parseInt(S.getPropertyValue("padding-left")),w=parseInt(S.getPropertyValue("padding-top"));return[p.clientX-y.left-C,p.clientY-y.top-w]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=d,a.getCoords=function(f,p,h,y,S,C,w,v,b){if(!C)return;const _=d(f,p,h);return _?(_[0]=Math.ceil((_[0]+(b?w/2:0))/w),_[1]=Math.ceil(_[1]/v),_[0]=Math.min(Math.max(_[0],1),y+(b?1:0)),_[1]=Math.min(Math.max(_[1],1),S),_):void 0}},9504:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=d(2584);function p(v,b,_,x){const k=v-h(v,_),N=b-h(b,_),A=Math.abs(k-N)-(function(M,R,j){let O=0;const B=M-h(M,j),q=R-h(R,j);for(let $=0;$<Math.abs(B-q);$++){const V=y(M,R)==="A"?-1:1,K=j.buffer.lines.get(B+V*$);K!=null&&K.isWrapped&&O++}return O})(v,b,_);return w(A,C(y(v,b),x))}function h(v,b){let _=0,x=b.buffer.lines.get(v),k=x==null?void 0:x.isWrapped;for(;k&&v>=0&&v<b.rows;)_++,x=b.buffer.lines.get(--v),k=x==null?void 0:x.isWrapped;return _}function y(v,b){return v>b?"A":"B"}function S(v,b,_,x,k,N){let A=v,M=b,R="";for(;A!==_||M!==x;)A+=k?1:-1,k&&A>N.cols-1?(R+=N.buffer.translateBufferLineToString(M,!1,v,A),A=0,v=0,M++):!k&&A<0&&(R+=N.buffer.translateBufferLineToString(M,!1,0,v+1),A=N.cols-1,v=A,M--);return R+N.buffer.translateBufferLineToString(M,!1,v,A)}function C(v,b){const _=b?"O":"[";return f.C0.ESC+_+v}function w(v,b){v=Math.floor(v);let _="";for(let x=0;x<v;x++)_+=b;return _}a.moveToCellSequence=function(v,b,_,x){const k=_.buffer.x,N=_.buffer.y;if(!_.buffer.hasScrollback)return(function(R,j,O,B,q,$){return p(j,B,q,$).length===0?"":w(S(R,j,R,j-h(j,q),!1,q).length,C("D",$))})(k,N,0,b,_,x)+p(N,b,_,x)+(function(R,j,O,B,q,$){let V;V=p(j,B,q,$).length>0?B-h(B,q):j;const K=B,G=(function(Y,Q,I,L,z,H){let F;return F=p(I,L,z,H).length>0?L-h(L,z):Q,Y<I&&F<=L||Y>=I&&F<L?"C":"D"})(R,j,O,B,q,$);return w(S(R,V,O,K,G==="C",q).length,C(G,$))})(k,N,v,b,_,x);let A;if(N===b)return A=k>v?"D":"C",w(Math.abs(k-v),C(A,x));A=N>b?"D":"C";const M=Math.abs(N-b);return w((function(R,j){return j.cols-R})(N>b?v:k,_)+(M-1)*_.cols+1+((N>b?k:v)-1),C(A,x))}},1296:function(u,a,d){var f=this&&this.__decorate||function($,V,K,G){var Y,Q=arguments.length,I=Q<3?V:G===null?G=Object.getOwnPropertyDescriptor(V,K):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate($,V,K,G);else for(var L=$.length-1;L>=0;L--)(Y=$[L])&&(I=(Q<3?Y(I):Q>3?Y(V,K,I):Y(V,K))||I);return Q>3&&I&&Object.defineProperty(V,K,I),I},p=this&&this.__param||function($,V){return function(K,G){V(K,G,$)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const h=d(3787),y=d(2550),S=d(2223),C=d(6171),w=d(6052),v=d(4725),b=d(8055),_=d(8460),x=d(844),k=d(2585),N="xterm-dom-renderer-owner-",A="xterm-rows",M="xterm-fg-",R="xterm-bg-",j="xterm-focus",O="xterm-selection";let B=1,q=a.DomRenderer=class extends x.Disposable{constructor($,V,K,G,Y,Q,I,L,z,H,F,J,ne){super(),this._terminal=$,this._document=V,this._element=K,this._screenElement=G,this._viewportElement=Y,this._helperContainer=Q,this._linkifier2=I,this._charSizeService=z,this._optionsService=H,this._bufferService=F,this._coreBrowserService=J,this._themeService=ne,this._terminalClass=B++,this._rowElements=[],this._selectionRenderModel=(0,w.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new _.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(A),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,C.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Z=>this._injectCss(Z)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((Z=>this._handleLinkHover(Z)))),this.register(this._linkifier2.onHideLinkUnderline((Z=>this._handleLinkLeave(Z)))),this.register((0,x.toDisposable)((()=>{this._element.classList.remove(N+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new y.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const $=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*$,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*$),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/$),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/$),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const K of this._rowElements)K.style.width=`${this.dimensions.css.canvas.width}px`,K.style.height=`${this.dimensions.css.cell.height}px`,K.style.lineHeight=`${this.dimensions.css.cell.height}px`,K.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss($){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${A} { color: ${$.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${A} .xterm-dim { color: ${b.color.multiplyOpacity($.foreground,.5).css};}`,V+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const K=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;V+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,V+=`@keyframes ${G} { 50% { box-shadow: none; }}`,V+=`@keyframes ${Y} { 0% { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css}; } 50% { background-color: inherit; color: ${$.cursor.css}; }}`,V+=`${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${$.cursor.css} !important; color: ${$.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${$.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${$.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${$.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${$.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${$.selectionInactiveBackgroundOpaque.css};}`;for(const[Q,I]of $.ansi.entries())V+=`${this._terminalSelector} .${M}${Q} { color: ${I.css}; }${this._terminalSelector} .${M}${Q}.xterm-dim { color: ${b.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${R}${Q} { background-color: ${I.css}; }`;V+=`${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque($.background).css}; }${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque($.background),.5).css}; }${this._terminalSelector} .${R}${S.INVERTED_DEFAULT_COLOR} { background-color: ${$.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const $=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${$}px`,this._rowFactory.defaultSpacing=$}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements($,V){for(let K=this._rowElements.length;K<=V;K++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize($,V){this._refreshRowElements($,V),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(j),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(j),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged($,V,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged($,V,K),this.renderRows(0,this._bufferService.rows-1),!$||!V)return;this._selectionRenderModel.update(this._terminal,$,V,K);const G=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,Q=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(Q>=this._bufferService.rows||I<0)return;const L=this._document.createDocumentFragment();if(K){const z=$[0]>V[0];L.appendChild(this._createSelectionElement(Q,z?V[0]:$[0],z?$[0]:V[0],I-Q+1))}else{const z=G===Q?$[0]:0,H=Q===Y?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(Q,z,H));const F=I-Q-1;if(L.appendChild(this._createSelectionElement(Q+1,0,this._bufferService.cols,F)),Q!==I){const J=Y===I?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(I,0,J))}}this._selectionContainer.appendChild(L)}_createSelectionElement($,V,K,G=1){const Y=this._document.createElement("div"),Q=V*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(K-V);return Q+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-Q),Y.style.height=G*this.dimensions.css.cell.height+"px",Y.style.top=$*this.dimensions.css.cell.height+"px",Y.style.left=`${Q}px`,Y.style.width=`${I}px`,Y}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const $ of this._rowElements)$.replaceChildren()}renderRows($,V){const K=this._bufferService.buffer,G=K.ybase+K.y,Y=Math.min(K.x,this._bufferService.cols-1),Q=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=$;z<=V;z++){const H=z+K.ydisp,F=this._rowElements[z],J=K.lines.get(H);if(!F||!J)break;F.replaceChildren(...this._rowFactory.createRow(J,H,H===G,I,L,Y,Q,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!0)}_handleLinkLeave($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!1)}_setCellUnderline($,V,K,G,Y,Q){K<0&&($=0),G<0&&(V=0);const I=this._bufferService.rows-1;K=Math.max(Math.min(K,I),0),G=Math.max(Math.min(G,I),0),Y=Math.min(Y,this._bufferService.cols);const L=this._bufferService.buffer,z=L.ybase+L.y,H=Math.min(L.x,Y-1),F=this._optionsService.rawOptions.cursorBlink,J=this._optionsService.rawOptions.cursorStyle,ne=this._optionsService.rawOptions.cursorInactiveStyle;for(let Z=K;Z<=G;++Z){const W=Z+L.ydisp,U=this._rowElements[Z],te=L.lines.get(W);if(!U||!te)break;U.replaceChildren(...this._rowFactory.createRow(te,W,W===z,J,ne,H,F,this.dimensions.css.cell.width,this._widthCache,Q?Z===K?$:0:-1,Q?(Z===G?V:Y)-1:-1))}}};a.DomRenderer=q=f([p(7,k.IInstantiationService),p(8,v.ICharSizeService),p(9,k.IOptionsService),p(10,k.IBufferService),p(11,v.ICoreBrowserService),p(12,v.IThemeService)],q)},3787:function(u,a,d){var f=this&&this.__decorate||function(A,M,R,j){var O,B=arguments.length,q=B<3?M:j===null?j=Object.getOwnPropertyDescriptor(M,R):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(A,M,R,j);else for(var $=A.length-1;$>=0;$--)(O=A[$])&&(q=(B<3?O(q):B>3?O(M,R,q):O(M,R))||q);return B>3&&q&&Object.defineProperty(M,R,q),q},p=this&&this.__param||function(A,M){return function(R,j){M(R,j,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const h=d(2223),y=d(643),S=d(511),C=d(2585),w=d(8055),v=d(4725),b=d(4269),_=d(6171),x=d(3734);let k=a.DomRendererRowFactory=class{constructor(A,M,R,j,O,B,q){this._document=A,this._characterJoinerService=M,this._optionsService=R,this._coreBrowserService=j,this._coreService=O,this._decorationService=B,this._themeService=q,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,M,R){this._selectionStart=A,this._selectionEnd=M,this._columnSelectMode=R}createRow(A,M,R,j,O,B,q,$,V,K,G){const Y=[],Q=this._characterJoinerService.getJoinedCharacters(M),I=this._themeService.colors;let L,z=A.getNoBgTrimmedLength();R&&z<B+1&&(z=B+1);let H=0,F="",J=0,ne=0,Z=0,W=!1,U=0,te=!1,ie=0;const ae=[],se=K!==-1&&G!==-1;for(let _e=0;_e<z;_e++){A.loadCell(_e,this._workCell);let Te=this._workCell.getWidth();if(Te===0)continue;let De=!1,Ke=_e,Ae=this._workCell;if(Q.length>0&&_e===Q[0][0]){De=!0;const je=Q.shift();Ae=new b.JoinedCellData(this._workCell,A.translateToString(!0,je[0],je[1]),je[1]-je[0]),Ke=je[1]-1,Te=Ae.getWidth()}const rt=this._isCellInSelection(_e,M),Je=R&&_e===B,Qe=se&&_e>=K&&_e<=G;let ot=!1;this._decorationService.forEachDecorationAtCell(_e,M,void 0,(je=>{ot=!0}));let ue=Ae.getChars()||y.WHITESPACE_CELL_CHAR;if(ue===" "&&(Ae.isUnderline()||Ae.isOverline())&&(ue=" "),ie=Te*$-V.get(ue,Ae.isBold(),Ae.isItalic()),L){if(H&&(rt&&te||!rt&&!te&&Ae.bg===J)&&(rt&&te&&I.selectionForeground||Ae.fg===ne)&&Ae.extended.ext===Z&&Qe===W&&ie===U&&!Je&&!De&&!ot){Ae.isInvisible()?F+=y.WHITESPACE_CELL_CHAR:F+=ue,H++;continue}H&&(L.textContent=F),L=this._document.createElement("span"),H=0,F=""}else L=this._document.createElement("span");if(J=Ae.bg,ne=Ae.fg,Z=Ae.extended.ext,W=Qe,U=ie,te=rt,De&&B>=_e&&B<=Ke&&(B=_e),!this._coreService.isCursorHidden&&Je&&this._coreService.isCursorInitialized){if(ae.push("xterm-cursor"),this._coreBrowserService.isFocused)q&&ae.push("xterm-cursor-blink"),ae.push(j==="bar"?"xterm-cursor-bar":j==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":ae.push("xterm-cursor-outline");break;case"block":ae.push("xterm-cursor-block");break;case"bar":ae.push("xterm-cursor-bar");break;case"underline":ae.push("xterm-cursor-underline")}}if(Ae.isBold()&&ae.push("xterm-bold"),Ae.isItalic()&&ae.push("xterm-italic"),Ae.isDim()&&ae.push("xterm-dim"),F=Ae.isInvisible()?y.WHITESPACE_CELL_CHAR:Ae.getChars()||y.WHITESPACE_CELL_CHAR,Ae.isUnderline()&&(ae.push(`xterm-underline-${Ae.extended.underlineStyle}`),F===" "&&(F=" "),!Ae.isUnderlineColorDefault()))if(Ae.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB(Ae.getUnderlineColor()).join(",")})`;else{let je=Ae.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ae.isBold()&&je<8&&(je+=8),L.style.textDecorationColor=I.ansi[je].css}Ae.isOverline()&&(ae.push("xterm-overline"),F===" "&&(F=" ")),Ae.isStrikethrough()&&ae.push("xterm-strikethrough"),Qe&&(L.style.textDecoration="underline");let it=Ae.getFgColor(),Ze=Ae.getFgColorMode(),dt=Ae.getBgColor(),ce=Ae.getBgColorMode();const xe=!!Ae.isInverse();if(xe){const je=it;it=dt,dt=je;const Ve=Ze;Ze=ce,ce=Ve}let pe,Me,Le,nt=!1;switch(this._decorationService.forEachDecorationAtCell(_e,M,void 0,(je=>{je.options.layer!=="top"&&nt||(je.backgroundColorRGB&&(ce=50331648,dt=je.backgroundColorRGB.rgba>>8&16777215,pe=je.backgroundColorRGB),je.foregroundColorRGB&&(Ze=50331648,it=je.foregroundColorRGB.rgba>>8&16777215,Me=je.foregroundColorRGB),nt=je.options.layer==="top")})),!nt&&rt&&(pe=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,dt=pe.rgba>>8&16777215,ce=50331648,nt=!0,I.selectionForeground&&(Ze=50331648,it=I.selectionForeground.rgba>>8&16777215,Me=I.selectionForeground)),nt&&ae.push("xterm-decoration-top"),ce){case 16777216:case 33554432:Le=I.ansi[dt],ae.push(`xterm-bg-${dt}`);break;case 50331648:Le=w.channels.toColor(dt>>16,dt>>8&255,255&dt),this._addStyle(L,`background-color:#${N((dt>>>0).toString(16),"0",6)}`);break;default:xe?(Le=I.foreground,ae.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Le=I.background}switch(pe||Ae.isDim()&&(pe=w.color.multiplyOpacity(Le,.5)),Ze){case 16777216:case 33554432:Ae.isBold()&&it<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(it+=8),this._applyMinimumContrast(L,Le,I.ansi[it],Ae,pe,void 0)||ae.push(`xterm-fg-${it}`);break;case 50331648:const je=w.channels.toColor(it>>16&255,it>>8&255,255&it);this._applyMinimumContrast(L,Le,je,Ae,pe,Me)||this._addStyle(L,`color:#${N(it.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Le,I.foreground,Ae,pe,Me)||xe&&ae.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}ae.length&&(L.className=ae.join(" "),ae.length=0),Je||De||ot?L.textContent=F:H++,ie!==this.defaultSpacing&&(L.style.letterSpacing=`${ie}px`),Y.push(L),_e=Ke}return L&&H&&(L.textContent=F),Y}_applyMinimumContrast(A,M,R,j,O,B){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,_.treatGlyphAsBackgroundColor)(j.getCode()))return!1;const q=this._getContrastCache(j);let $;if(O||B||($=q.getColor(M.rgba,R.rgba)),$===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(j.isDim()?2:1);$=w.color.ensureContrastRatio(O||M,B||R,V),q.setColor((O||M).rgba,(B||R).rgba,$!=null?$:null)}return!!$&&(this._addStyle(A,`color:${$.css}`),!0)}_getContrastCache(A){return A.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(A,M){A.setAttribute("style",`${A.getAttribute("style")||""}${M};`)}_isCellInSelection(A,M){const R=this._selectionStart,j=this._selectionEnd;return!(!R||!j)&&(this._columnSelectMode?R[0]<=j[0]?A>=R[0]&&M>=R[1]&&A<j[0]&&M<=j[1]:A<R[0]&&M>=R[1]&&A>=j[0]&&M<=j[1]:M>R[1]&&M<j[1]||R[1]===j[1]&&M===R[1]&&A>=R[0]&&A<j[0]||R[1]<j[1]&&M===j[1]&&A<j[0]||R[1]<j[1]&&M===R[1]&&A>=R[0])}};function N(A,M,R){for(;A.length<R;)A=M+A;return A}a.DomRendererRowFactory=k=f([p(1,v.ICharacterJoinerService),p(2,C.IOptionsService),p(3,v.ICoreBrowserService),p(4,C.ICoreService),p(5,C.IDecorationService),p(6,v.IThemeService)],k)},2550:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(d,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=d.createElement("span");p.classList.add("xterm-char-measure-element");const h=d.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const y=d.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontStyle="italic";const S=d.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[p,h,y,S],this._container.appendChild(p),this._container.appendChild(h),this._container.appendChild(y),this._container.appendChild(S),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(d,f,p,h){d===this._font&&f===this._fontSize&&p===this._weight&&h===this._weightBold||(this._font=d,this._fontSize=f,this._weight=p,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(d,f,p){let h=0;if(!f&&!p&&d.length===1&&(h=d.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const C=this._measure(d,0);return C>0&&(this._flat[h]=C),C}let y=d;f&&(y+="B"),p&&(y+="I");let S=this._holey.get(y);if(S===void 0){let C=0;f&&(C|=1),p&&(C|=2),S=this._measure(d,C),S>0&&this._holey.set(y,S)}return S}_measure(d,f){const p=this._measureElements[f];return p.textContent=d.repeat(32),p.offsetWidth/32}}},2223:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=d(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(u,a)=>{function d(p){return 57508<=p&&p<=57558}function f(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=f,a.allowRescaling=function(p,h,y,S){return h===1&&y>Math.ceil(1.5*S)&&p!==void 0&&p>255&&!f(p)&&!d(p)&&!(function(C){return 57344<=C&&C<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return d(p)||(function(h){return 9472<=h&&h<=9631})(p)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(p,h,y=0){return(p-(2*Math.round(h)-y))%(2*Math.round(h))}},6052:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,h,y,S=!1){if(this.selectionStart=h,this.selectionEnd=y,!h||!y||h[0]===y[0]&&h[1]===y[1])return void this.clear();const C=p.buffers.active.ydisp,w=h[1]-C,v=y[1]-C,b=Math.max(w,0),_=Math.min(v,p.rows-1);b>=p.rows||_<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=w,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=_,this.startCol=h[0],this.endCol=y[0])}isCellSelected(p,h,y){return!!this.hasSelection&&(y-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&y>=this.viewportCappedStartRow&&h<this.endCol&&y<=this.viewportCappedEndRow:h<this.startCol&&y>=this.viewportCappedStartRow&&h>=this.endCol&&y<=this.viewportCappedEndRow:y>this.viewportStartRow&&y<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&y===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},456:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(d){this._bufferService=d,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,f=this.selectionEnd;return!(!d||!f)&&(d[1]>f[1]||d[1]===f[1]&&d[0]>f[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(u,a,d){var f=this&&this.__decorate||function(_,x,k,N){var A,M=arguments.length,R=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,x,k,N);else for(var j=_.length-1;j>=0;j--)(A=_[j])&&(R=(M<3?A(R):M>3?A(x,k,R):A(x,k))||R);return M>3&&R&&Object.defineProperty(x,k,R),R},p=this&&this.__param||function(_,x){return function(k,N){x(k,N,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const h=d(2585),y=d(8460),S=d(844);let C=a.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(_,x,k){super(),this._optionsService=k,this.width=0,this.height=0,this._onCharSizeChange=this.register(new y.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new v(_,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const _=this._measureStrategy.measure();_.width===this.width&&_.height===this.height||(this.width=_.width,this.height=_.height,this._onCharSizeChange.fire())}};a.CharSizeService=C=f([p(2,h.IOptionsService)],C);class w extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,k){x!==void 0&&x>0&&k!==void 0&&k>0&&(this._result.width=x,this._result.height=k)}}class v extends w{constructor(x,k,N){super(),this._document=x,this._parentElement=k,this._optionsService=N,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class b extends w{constructor(x){super(),this._optionsService=x,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const k=this._ctx.measureText("W");if(!("width"in k&&"fontBoundingBoxAscent"in k&&"fontBoundingBoxDescent"in k))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(u,a,d){var f=this&&this.__decorate||function(b,_,x,k){var N,A=arguments.length,M=A<3?_:k===null?k=Object.getOwnPropertyDescriptor(_,x):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,_,x,k);else for(var R=b.length-1;R>=0;R--)(N=b[R])&&(M=(A<3?N(M):A>3?N(_,x,M):N(_,x))||M);return A>3&&M&&Object.defineProperty(_,x,M),M},p=this&&this.__param||function(b,_){return function(x,k){_(x,k,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const h=d(3734),y=d(643),S=d(511),C=d(2585);class w extends h.AttributeData{constructor(_,x,k){super(),this.content=0,this.combinedData="",this.fg=_.fg,this.bg=_.bg,this.combinedData=x,this._width=k}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(_){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=w;let v=a.CharacterJoinerService=class PC{constructor(_){this._bufferService=_,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(_){const x={id:this._nextCharacterJoinerId++,handler:_};return this._characterJoiners.push(x),x.id}deregister(_){for(let x=0;x<this._characterJoiners.length;x++)if(this._characterJoiners[x].id===_)return this._characterJoiners.splice(x,1),!0;return!1}getJoinedCharacters(_){if(this._characterJoiners.length===0)return[];const x=this._bufferService.buffer.lines.get(_);if(!x||x.length===0)return[];const k=[],N=x.translateToString(!0);let A=0,M=0,R=0,j=x.getFg(0),O=x.getBg(0);for(let B=0;B<x.getTrimmedLength();B++)if(x.loadCell(B,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==j||this._workCell.bg!==O){if(B-A>1){const q=this._getJoinedRanges(N,R,M,x,A);for(let $=0;$<q.length;$++)k.push(q[$])}A=B,R=M,j=this._workCell.fg,O=this._workCell.bg}M+=this._workCell.getChars().length||y.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const B=this._getJoinedRanges(N,R,M,x,A);for(let q=0;q<B.length;q++)k.push(B[q])}return k}_getJoinedRanges(_,x,k,N,A){const M=_.substring(x,k);let R=[];try{R=this._characterJoiners[0].handler(M)}catch(j){console.error(j)}for(let j=1;j<this._characterJoiners.length;j++)try{const O=this._characterJoiners[j].handler(M);for(let B=0;B<O.length;B++)PC._mergeRanges(R,O[B])}catch(O){console.error(O)}return this._stringRangesToCellRanges(R,N,A),R}_stringRangesToCellRanges(_,x,k){let N=0,A=!1,M=0,R=_[N];if(R){for(let j=k;j<this._bufferService.cols;j++){const O=x.getWidth(j),B=x.getString(j).length||y.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!A&&R[0]<=M&&(R[0]=j,A=!0),R[1]<=M){if(R[1]=j,R=_[++N],!R)break;R[0]<=M?(R[0]=j,A=!0):A=!1}M+=B}}R&&(R[1]=this._bufferService.cols)}}static _mergeRanges(_,x){let k=!1;for(let N=0;N<_.length;N++){const A=_[N];if(k){if(x[1]<=A[0])return _[N-1][1]=x[1],_;if(x[1]<=A[1])return _[N-1][1]=Math.max(x[1],A[1]),_.splice(N,1),_;_.splice(N,1),N--}else{if(x[1]<=A[0])return _.splice(N,0,x),_;if(x[1]<=A[1])return A[0]=Math.min(x[0],A[0]),_;x[0]<A[1]&&(A[0]=Math.min(x[0],A[0]),k=!0)}}return k?_[_.length-1][1]=x[1]:_.push(x),_}};a.CharacterJoinerService=v=f([p(0,C.IBufferService)],v)},5114:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const f=d(844),p=d(8460),h=d(3656);class y extends f.Disposable{constructor(w,v,b){super(),this._textarea=w,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((_=>this._screenDprMonitor.setWindow(_)))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(w){this._window!==w&&(this._window=w,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=y;class S extends f.Disposable{constructor(w){super(),this._parentWindow=w,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)((()=>this.clearListener())))}setWindow(w){this._parentWindow=w,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var w;this._outerListener&&((w=this._resolutionMediaMatchList)==null||w.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const f=d(844);class p extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(y){return this.linkProviders.push(y),{dispose:()=>{const S=this.linkProviders.indexOf(y);S!==-1&&this.linkProviders.splice(S,1)}}}}a.LinkProviderService=p},8934:function(u,a,d){var f=this&&this.__decorate||function(C,w,v,b){var _,x=arguments.length,k=x<3?w:b===null?b=Object.getOwnPropertyDescriptor(w,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(C,w,v,b);else for(var N=C.length-1;N>=0;N--)(_=C[N])&&(k=(x<3?_(k):x>3?_(w,v,k):_(w,v))||k);return x>3&&k&&Object.defineProperty(w,v,k),k},p=this&&this.__param||function(C,w){return function(v,b){w(v,b,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const h=d(4725),y=d(9806);let S=a.MouseService=class{constructor(C,w){this._renderService=C,this._charSizeService=w}getCoords(C,w,v,b,_){return(0,y.getCoords)(window,C,w,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,_)}getMouseReportCoords(C,w){const v=(0,y.getCoordsRelativeToElement)(window,C,w);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};a.MouseService=S=f([p(0,h.IRenderService),p(1,h.ICharSizeService)],S)},3230:function(u,a,d){var f=this&&this.__decorate||function(_,x,k,N){var A,M=arguments.length,R=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,x,k,N);else for(var j=_.length-1;j>=0;j--)(A=_[j])&&(R=(M<3?A(R):M>3?A(x,k,R):A(x,k))||R);return M>3&&R&&Object.defineProperty(x,k,R),R},p=this&&this.__param||function(_,x){return function(k,N){x(k,N,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const h=d(6193),y=d(4725),S=d(8460),C=d(844),w=d(7226),v=d(2585);let b=a.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,x,k,N,A,M,R,j){super(),this._rowCount=_,this._charSizeService=N,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new w.DebouncedIdleTask,this._observerDisposable=this.register(new C.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((O,B)=>this._renderRows(O,B)),R),this.register(this._renderDebouncer),this.register(R.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(M.onResize((()=>this._fullRefresh()))),this.register(M.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(k.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(A.onDecorationRegistered((()=>this._fullRefresh()))),this.register(A.onDecorationRemoved((()=>this._fullRefresh()))),this.register(k.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(M.cols,M.rows),this._fullRefresh()}))),this.register(k.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(M.buffer.y,M.buffer.y,!0)))),this.register(j.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(R.window,x),this.register(R.onWindowChange((O=>this._registerIntersectionObserver(O,x))))}_registerIntersectionObserver(_,x){if("IntersectionObserver"in _){const k=new _.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});k.observe(x),this._observerDisposable.value=(0,C.toDisposable)((()=>k.disconnect()))}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(_,x,k=!1){this._isPaused?this._needsFullRefresh=!0:(k||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,x,this._rowCount))}_renderRows(_,x){this._renderer.value&&(_=Math.min(_,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(_,x),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:_,end:x}),this._onRender.fire({start:_,end:x}),this._isNextRenderRedrawOnly=!0)}resize(_,x){this._rowCount=x,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(_){this._renderer.value=_,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var _,x;this._renderer.value&&((x=(_=this._renderer.value).clearTextureAtlas)==null||x.call(_),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var k;return(k=this._renderer.value)==null?void 0:k.handleResize(_,x)})):this._renderer.value.handleResize(_,x),this._fullRefresh())}handleCharSizeChanged(){var _;(_=this._renderer.value)==null||_.handleCharSizeChanged()}handleBlur(){var _;(_=this._renderer.value)==null||_.handleBlur()}handleFocus(){var _;(_=this._renderer.value)==null||_.handleFocus()}handleSelectionChanged(_,x,k){var N;this._selectionState.start=_,this._selectionState.end=x,this._selectionState.columnSelectMode=k,(N=this._renderer.value)==null||N.handleSelectionChanged(_,x,k)}handleCursorMove(){var _;(_=this._renderer.value)==null||_.handleCursorMove()}clear(){var _;(_=this._renderer.value)==null||_.clear()}};a.RenderService=b=f([p(2,v.IOptionsService),p(3,y.ICharSizeService),p(4,v.IDecorationService),p(5,v.IBufferService),p(6,y.ICoreBrowserService),p(7,y.IThemeService)],b)},9312:function(u,a,d){var f=this&&this.__decorate||function(R,j,O,B){var q,$=arguments.length,V=$<3?j:B===null?B=Object.getOwnPropertyDescriptor(j,O):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(R,j,O,B);else for(var K=R.length-1;K>=0;K--)(q=R[K])&&(V=($<3?q(V):$>3?q(j,O,V):q(j,O))||V);return $>3&&V&&Object.defineProperty(j,O,V),V},p=this&&this.__param||function(R,j){return function(O,B){j(O,B,R)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const h=d(9806),y=d(9504),S=d(456),C=d(4725),w=d(8460),v=d(844),b=d(6114),_=d(4841),x=d(511),k=d(2585),N=" ",A=new RegExp(N,"g");let M=a.SelectionService=class extends v.Disposable{constructor(R,j,O,B,q,$,V,K,G){super(),this._element=R,this._screenElement=j,this._linkifier=O,this._bufferService=B,this._coreService=q,this._mouseService=$,this._optionsService=V,this._renderService=K,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new w.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new w.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new w.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Y=>this._handleMouseMove(Y),this._mouseUpListener=Y=>this._handleMouseUp(Y),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Y=>this._handleTrim(Y))),this.register(this._bufferService.buffers.onBufferActivate((Y=>this._handleBufferActivate(Y)))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const R=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!R||!j||R[0]===j[0]&&R[1]===j[1])}get selectionText(){const R=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;if(!R||!j)return"";const O=this._bufferService.buffer,B=[];if(this._activeSelectionMode===3){if(R[0]===j[0])return"";const q=R[0]<j[0]?R[0]:j[0],$=R[0]<j[0]?j[0]:R[0];for(let V=R[1];V<=j[1];V++){const K=O.translateBufferLineToString(V,!0,q,$);B.push(K)}}else{const q=R[1]===j[1]?j[0]:void 0;B.push(O.translateBufferLineToString(R[1],!0,R[0],q));for(let $=R[1]+1;$<=j[1]-1;$++){const V=O.lines.get($),K=O.translateBufferLineToString($,!0);V!=null&&V.isWrapped?B[B.length-1]+=K:B.push(K)}if(R[1]!==j[1]){const $=O.lines.get(j[1]),V=O.translateBufferLineToString(j[1],!0,0,j[0]);$&&$.isWrapped?B[B.length-1]+=V:B.push(V)}}return B.map((q=>q.replace(A," "))).join(b.isWindows?`\r
|
|
511
|
+
`:`
|
|
512
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(R){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&R&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(R){const j=this._getMouseBufferCoords(R),O=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!!(O&&B&&j)&&this._areCoordsInSelection(j,O,B)}isCellInSelection(R,j){const O=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!O||!B)&&this._areCoordsInSelection([R,j],O,B)}_areCoordsInSelection(R,j,O){return R[1]>j[1]&&R[1]<O[1]||j[1]===O[1]&&R[1]===j[1]&&R[0]>=j[0]&&R[0]<O[0]||j[1]<O[1]&&R[1]===O[1]&&R[0]<O[0]||j[1]<O[1]&&R[1]===j[1]&&R[0]>=j[0]}_selectWordAtCursor(R,j){var q,$;const O=($=(q=this._linkifier.currentLink)==null?void 0:q.link)==null?void 0:$.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,_.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const B=this._getMouseBufferCoords(R);return!!B&&(this._selectWordAt(B,j),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(R,j){this._model.clearSelection(),R=Math.max(R,0),j=Math.min(j,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,R],this._model.selectionEnd=[this._bufferService.cols,j],this.refresh(),this._onSelectionChange.fire()}_handleTrim(R){this._model.handleTrim(R)&&this.refresh()}_getMouseBufferCoords(R){const j=this._mouseService.getCoords(R,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(j)return j[0]--,j[1]--,j[1]+=this._bufferService.buffer.ydisp,j}_getMouseEventScrollAmount(R){let j=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,R,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return j>=0&&j<=O?0:(j>O&&(j-=O),j=Math.min(Math.max(j,-50),50),j/=50,j/Math.abs(j)+Math.round(14*j))}shouldForceSelection(R){return b.isMac?R.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:R.shiftKey}handleMouseDown(R){if(this._mouseDownTimeStamp=R.timeStamp,(R.button!==2||!this.hasSelection)&&R.button===0){if(!this._enabled){if(!this.shouldForceSelection(R))return;R.stopPropagation()}R.preventDefault(),this._dragScrollAmount=0,this._enabled&&R.shiftKey?this._handleIncrementalClick(R):R.detail===1?this._handleSingleClick(R):R.detail===2?this._handleDoubleClick(R):R.detail===3&&this._handleTripleClick(R),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(R){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(R))}_handleSingleClick(R){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(R)?3:0,this._model.selectionStart=this._getMouseBufferCoords(R),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const j=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);j&&j.length!==this._model.selectionStart[0]&&j.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(R){this._selectWordAtCursor(R,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(R){const j=this._getMouseBufferCoords(R);j&&(this._activeSelectionMode=2,this._selectLineAt(j[1]))}shouldColumnSelect(R){return R.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(R){if(R.stopImmediatePropagation(),!this._model.selectionStart)return;const j=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(R),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(R),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){const B=O.lines.get(this._model.selectionEnd[1]);B&&B.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}j&&j[0]===this._model.selectionEnd[0]&&j[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const R=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(R.ydisp+this._bufferService.rows,R.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=R.ydisp),this.refresh()}}_handleMouseUp(R){const j=R.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&j<500&&R.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(R,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const B=(0,y.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(B,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const R=this._model.finalSelectionStart,j=this._model.finalSelectionEnd,O=!(!R||!j||R[0]===j[0]&&R[1]===j[1]);O?R&&j&&(this._oldSelectionStart&&this._oldSelectionEnd&&R[0]===this._oldSelectionStart[0]&&R[1]===this._oldSelectionStart[1]&&j[0]===this._oldSelectionEnd[0]&&j[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(R,j,O)):this._oldHasSelection&&this._fireOnSelectionChange(R,j,O)}_fireOnSelectionChange(R,j,O){this._oldSelectionStart=R,this._oldSelectionEnd=j,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(R){this.clearSelection(),this._trimListener.dispose(),this._trimListener=R.activeBuffer.lines.onTrim((j=>this._handleTrim(j)))}_convertViewportColToCharacterIndex(R,j){let O=j;for(let B=0;j>=B;B++){const q=R.loadCell(B,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:q>1&&j!==B&&(O+=q-1)}return O}setSelection(R,j,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[R,j],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(R){this._isClickInSelection(R)||(this._selectWordAtCursor(R,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(R,j,O=!0,B=!0){if(R[0]>=this._bufferService.cols)return;const q=this._bufferService.buffer,$=q.lines.get(R[1]);if(!$)return;const V=q.translateBufferLineToString(R[1],!1);let K=this._convertViewportColToCharacterIndex($,R[0]),G=K;const Y=R[0]-K;let Q=0,I=0,L=0,z=0;if(V.charAt(K)===" "){for(;K>0&&V.charAt(K-1)===" ";)K--;for(;G<V.length&&V.charAt(G+1)===" ";)G++}else{let J=R[0],ne=R[0];$.getWidth(J)===0&&(Q++,J--),$.getWidth(ne)===2&&(I++,ne++);const Z=$.getString(ne).length;for(Z>1&&(z+=Z-1,G+=Z-1);J>0&&K>0&&!this._isCharWordSeparator($.loadCell(J-1,this._workCell));){$.loadCell(J-1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===0?(Q++,J--):W>1&&(L+=W-1,K-=W-1),K--,J--}for(;ne<$.length&&G+1<V.length&&!this._isCharWordSeparator($.loadCell(ne+1,this._workCell));){$.loadCell(ne+1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===2?(I++,ne++):W>1&&(z+=W-1,G+=W-1),G++,ne++}}G++;let H=K+Y-Q+L,F=Math.min(this._bufferService.cols,G-K+Q+I-L-z);if(j||V.slice(K,G).trim()!==""){if(O&&H===0&&$.getCodePoint(0)!==32){const J=q.lines.get(R[1]-1);if(J&&$.isWrapped&&J.getCodePoint(this._bufferService.cols-1)!==32){const ne=this._getWordAt([this._bufferService.cols-1,R[1]-1],!1,!0,!1);if(ne){const Z=this._bufferService.cols-ne.start;H-=Z,F+=Z}}}if(B&&H+F===this._bufferService.cols&&$.getCodePoint(this._bufferService.cols-1)!==32){const J=q.lines.get(R[1]+1);if(J!=null&&J.isWrapped&&J.getCodePoint(0)!==32){const ne=this._getWordAt([0,R[1]+1],!1,!1,!0);ne&&(F+=ne.length)}}return{start:H,length:F}}}_selectWordAt(R,j){const O=this._getWordAt(R,j);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,R[1]--;this._model.selectionStart=[O.start,R[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(R){const j=this._getWordAt(R,!0);if(j){let O=R[1];for(;j.start<0;)j.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;j.start+j.length>this._bufferService.cols;)j.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?j.start:j.start+j.length,O]}}_isCharWordSeparator(R){return R.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(R.getChars())>=0}_selectLineAt(R){const j=this._bufferService.buffer.getWrappedRangeForLine(R),O={start:{x:0,y:j.first},end:{x:this._bufferService.cols-1,y:j.last}};this._model.selectionStart=[0,j.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,_.getRangeLength)(O,this._bufferService.cols)}};a.SelectionService=M=f([p(3,k.IBufferService),p(4,k.ICoreService),p(5,C.IMouseService),p(6,k.IOptionsService),p(7,C.IRenderService),p(8,C.ICoreBrowserService)],M)},4725:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const f=d(8343);a.ICharSizeService=(0,f.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),a.IMouseService=(0,f.createDecorator)("MouseService"),a.IRenderService=(0,f.createDecorator)("RenderService"),a.ISelectionService=(0,f.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,f.createDecorator)("ThemeService"),a.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(u,a,d){var f=this&&this.__decorate||function(M,R,j,O){var B,q=arguments.length,$=q<3?R:O===null?O=Object.getOwnPropertyDescriptor(R,j):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(M,R,j,O);else for(var V=M.length-1;V>=0;V--)(B=M[V])&&($=(q<3?B($):q>3?B(R,j,$):B(R,j))||$);return q>3&&$&&Object.defineProperty(R,j,$),$},p=this&&this.__param||function(M,R){return function(j,O){R(j,O,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const h=d(7239),y=d(8055),S=d(8460),C=d(844),w=d(2585),v=y.css.toColor("#ffffff"),b=y.css.toColor("#000000"),_=y.css.toColor("#ffffff"),x=y.css.toColor("#000000"),k={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const M=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],R=[0,95,135,175,215,255];for(let j=0;j<216;j++){const O=R[j/36%6|0],B=R[j/6%6|0],q=R[j%6];M.push({css:y.channels.toCss(O,B,q),rgba:y.channels.toRgba(O,B,q)})}for(let j=0;j<24;j++){const O=8+10*j;M.push({css:y.channels.toCss(O,O,O),rgba:y.channels.toRgba(O,O,O)})}return M})());let N=a.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(M){super(),this._optionsService=M,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:b,cursor:_,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:k,selectionBackgroundOpaque:y.color.blend(b,k),selectionInactiveBackgroundTransparent:k,selectionInactiveBackgroundOpaque:y.color.blend(b,k),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(M={}){const R=this._colors;if(R.foreground=A(M.foreground,v),R.background=A(M.background,b),R.cursor=A(M.cursor,_),R.cursorAccent=A(M.cursorAccent,x),R.selectionBackgroundTransparent=A(M.selectionBackground,k),R.selectionBackgroundOpaque=y.color.blend(R.background,R.selectionBackgroundTransparent),R.selectionInactiveBackgroundTransparent=A(M.selectionInactiveBackground,R.selectionBackgroundTransparent),R.selectionInactiveBackgroundOpaque=y.color.blend(R.background,R.selectionInactiveBackgroundTransparent),R.selectionForeground=M.selectionForeground?A(M.selectionForeground,y.NULL_COLOR):void 0,R.selectionForeground===y.NULL_COLOR&&(R.selectionForeground=void 0),y.color.isOpaque(R.selectionBackgroundTransparent)&&(R.selectionBackgroundTransparent=y.color.opacity(R.selectionBackgroundTransparent,.3)),y.color.isOpaque(R.selectionInactiveBackgroundTransparent)&&(R.selectionInactiveBackgroundTransparent=y.color.opacity(R.selectionInactiveBackgroundTransparent,.3)),R.ansi=a.DEFAULT_ANSI_COLORS.slice(),R.ansi[0]=A(M.black,a.DEFAULT_ANSI_COLORS[0]),R.ansi[1]=A(M.red,a.DEFAULT_ANSI_COLORS[1]),R.ansi[2]=A(M.green,a.DEFAULT_ANSI_COLORS[2]),R.ansi[3]=A(M.yellow,a.DEFAULT_ANSI_COLORS[3]),R.ansi[4]=A(M.blue,a.DEFAULT_ANSI_COLORS[4]),R.ansi[5]=A(M.magenta,a.DEFAULT_ANSI_COLORS[5]),R.ansi[6]=A(M.cyan,a.DEFAULT_ANSI_COLORS[6]),R.ansi[7]=A(M.white,a.DEFAULT_ANSI_COLORS[7]),R.ansi[8]=A(M.brightBlack,a.DEFAULT_ANSI_COLORS[8]),R.ansi[9]=A(M.brightRed,a.DEFAULT_ANSI_COLORS[9]),R.ansi[10]=A(M.brightGreen,a.DEFAULT_ANSI_COLORS[10]),R.ansi[11]=A(M.brightYellow,a.DEFAULT_ANSI_COLORS[11]),R.ansi[12]=A(M.brightBlue,a.DEFAULT_ANSI_COLORS[12]),R.ansi[13]=A(M.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),R.ansi[14]=A(M.brightCyan,a.DEFAULT_ANSI_COLORS[14]),R.ansi[15]=A(M.brightWhite,a.DEFAULT_ANSI_COLORS[15]),M.extendedAnsi){const j=Math.min(R.ansi.length-16,M.extendedAnsi.length);for(let O=0;O<j;O++)R.ansi[O+16]=A(M.extendedAnsi[O],a.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(M){this._restoreColor(M),this._onChangeColors.fire(this.colors)}_restoreColor(M){if(M!==void 0)switch(M){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[M]=this._restoreColors.ansi[M]}else for(let R=0;R<this._restoreColors.ansi.length;++R)this._colors.ansi[R]=this._restoreColors.ansi[R]}modifyColors(M){M(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function A(M,R){if(M!==void 0)try{return y.css.toColor(M)}catch{}return R}a.ThemeService=N=f([p(0,w.IOptionsService)],N)},6349:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const f=d(8460),p=d(844);class h extends p.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(S){if(this._maxLength===S)return;const C=new Array(S);for(let w=0;w<Math.min(S,this.length);w++)C[w]=this._array[this._getCyclicIndex(w)];this._array=C,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let C=this._length;C<S;C++)this._array[C]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,C){this._array[this._getCyclicIndex(S)]=C}push(S){this._array[this._getCyclicIndex(this._length)]=S,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(S,C,...w){if(C){for(let v=S;v<this._length-C;v++)this._array[this._getCyclicIndex(v)]=this._array[this._getCyclicIndex(v+C)];this._length-=C,this.onDeleteEmitter.fire({index:S,amount:C})}for(let v=this._length-1;v>=S;v--)this._array[this._getCyclicIndex(v+w.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;v<w.length;v++)this._array[this._getCyclicIndex(S+v)]=w[v];if(w.length&&this.onInsertEmitter.fire({index:S,amount:w.length}),this._length+w.length>this._maxLength){const v=this._length+w.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=w.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,C,w){if(!(C<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+w<0)throw new Error("Cannot shift elements in list beyond index 0");if(w>0){for(let b=C-1;b>=0;b--)this.set(S+b+w,this.get(S+b));const v=S+C+w-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v<C;v++)this.set(S+v+w,this.get(S+v))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}a.CircularList=h},1439:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function d(f,p=5){if(typeof f!="object")return f;const h=Array.isArray(f)?[]:{};for(const y in f)h[y]=p<=1?f[y]:f[y]&&d(f[y],p-1);return h}},8055:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,f=0,p=0,h=0;var y,S,C,w,v;function b(x){const k=x.toString(16);return k.length<2?"0"+k:k}function _(x,k){return x<k?(k+.05)/(x+.05):(x+.05)/(k+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(x){x.toCss=function(k,N,A,M){return M!==void 0?`#${b(k)}${b(N)}${b(A)}${b(M)}`:`#${b(k)}${b(N)}${b(A)}`},x.toRgba=function(k,N,A,M=255){return(k<<24|N<<16|A<<8|M)>>>0},x.toColor=function(k,N,A,M){return{css:x.toCss(k,N,A,M),rgba:x.toRgba(k,N,A,M)}}})(y||(a.channels=y={})),(function(x){function k(N,A){return h=Math.round(255*A),[d,f,p]=v.toChannels(N.rgba),{css:y.toCss(d,f,p,h),rgba:y.toRgba(d,f,p,h)}}x.blend=function(N,A){if(h=(255&A.rgba)/255,h===1)return{css:A.css,rgba:A.rgba};const M=A.rgba>>24&255,R=A.rgba>>16&255,j=A.rgba>>8&255,O=N.rgba>>24&255,B=N.rgba>>16&255,q=N.rgba>>8&255;return d=O+Math.round((M-O)*h),f=B+Math.round((R-B)*h),p=q+Math.round((j-q)*h),{css:y.toCss(d,f,p),rgba:y.toRgba(d,f,p)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,A,M){const R=v.ensureContrastRatio(N.rgba,A.rgba,M);if(R)return y.toColor(R>>24&255,R>>16&255,R>>8&255)},x.opaque=function(N){const A=(255|N.rgba)>>>0;return[d,f,p]=v.toChannels(A),{css:y.toCss(d,f,p),rgba:A}},x.opacity=k,x.multiplyOpacity=function(N,A){return h=255&N.rgba,k(N,h*A/255)},x.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(S||(a.color=S={})),(function(x){let k,N;try{const A=document.createElement("canvas");A.width=1,A.height=1;const M=A.getContext("2d",{willReadFrequently:!0});M&&(k=M,k.globalCompositeOperation="copy",N=k.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return d=parseInt(A.slice(1,2).repeat(2),16),f=parseInt(A.slice(2,3).repeat(2),16),p=parseInt(A.slice(3,4).repeat(2),16),y.toColor(d,f,p);case 5:return d=parseInt(A.slice(1,2).repeat(2),16),f=parseInt(A.slice(2,3).repeat(2),16),p=parseInt(A.slice(3,4).repeat(2),16),h=parseInt(A.slice(4,5).repeat(2),16),y.toColor(d,f,p,h);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const M=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(M)return d=parseInt(M[1]),f=parseInt(M[2]),p=parseInt(M[3]),h=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),y.toColor(d,f,p,h);if(!k||!N)throw new Error("css.toColor: Unsupported css format");if(k.fillStyle=N,k.fillStyle=A,typeof k.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(k.fillRect(0,0,1,1),[d,f,p,h]=k.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:y.toRgba(d,f,p,h),css:A}}})(C||(a.css=C={})),(function(x){function k(N,A,M){const R=N/255,j=A/255,O=M/255;return .2126*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.7152*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}x.relativeLuminance=function(N){return k(N>>16&255,N>>8&255,255&N)},x.relativeLuminance2=k})(w||(a.rgb=w={})),(function(x){function k(A,M,R){const j=A>>24&255,O=A>>16&255,B=A>>8&255;let q=M>>24&255,$=M>>16&255,V=M>>8&255,K=_(w.relativeLuminance2(q,$,V),w.relativeLuminance2(j,O,B));for(;K<R&&(q>0||$>0||V>0);)q-=Math.max(0,Math.ceil(.1*q)),$-=Math.max(0,Math.ceil(.1*$)),V-=Math.max(0,Math.ceil(.1*V)),K=_(w.relativeLuminance2(q,$,V),w.relativeLuminance2(j,O,B));return(q<<24|$<<16|V<<8|255)>>>0}function N(A,M,R){const j=A>>24&255,O=A>>16&255,B=A>>8&255;let q=M>>24&255,$=M>>16&255,V=M>>8&255,K=_(w.relativeLuminance2(q,$,V),w.relativeLuminance2(j,O,B));for(;K<R&&(q<255||$<255||V<255);)q=Math.min(255,q+Math.ceil(.1*(255-q))),$=Math.min(255,$+Math.ceil(.1*(255-$))),V=Math.min(255,V+Math.ceil(.1*(255-V))),K=_(w.relativeLuminance2(q,$,V),w.relativeLuminance2(j,O,B));return(q<<24|$<<16|V<<8|255)>>>0}x.blend=function(A,M){if(h=(255&M)/255,h===1)return M;const R=M>>24&255,j=M>>16&255,O=M>>8&255,B=A>>24&255,q=A>>16&255,$=A>>8&255;return d=B+Math.round((R-B)*h),f=q+Math.round((j-q)*h),p=$+Math.round((O-$)*h),y.toRgba(d,f,p)},x.ensureContrastRatio=function(A,M,R){const j=w.relativeLuminance(A>>8),O=w.relativeLuminance(M>>8);if(_(j,O)<R){if(O<j){const $=k(A,M,R),V=_(j,w.relativeLuminance($>>8));if(V<R){const K=N(A,M,R);return V>_(j,w.relativeLuminance(K>>8))?$:K}return $}const B=N(A,M,R),q=_(j,w.relativeLuminance(B>>8));if(q<R){const $=k(A,M,R);return q>_(j,w.relativeLuminance($>>8))?B:$}return B}},x.reduceLuminance=k,x.increaseLuminance=N,x.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(v||(a.rgba=v={})),a.toPaddedHex=b,a.contrastRatio=_},8969:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=d(844),p=d(2585),h=d(4348),y=d(7866),S=d(744),C=d(7302),w=d(6975),v=d(8460),b=d(1753),_=d(1480),x=d(7994),k=d(9282),N=d(5435),A=d(5981),M=d(2660);let R=!1;class j extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((B=>{var q;(q=this._onScrollApi)==null||q.fire(B.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(B){for(const q in B)this.optionsService.options[q]=B[q]}constructor(B){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new C.OptionsService(B)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(y.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(w.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(_.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(M.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new N.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((q=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((q=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new A.WriteBuffer(((q,$)=>this._inputHandler.parse(q,$)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(B,q){this._writeBuffer.write(B,q)}writeSync(B,q){this._logService.logLevel<=p.LogLevelEnum.WARN&&!R&&(this._logService.warn("writeSync is unreliable and will be removed soon."),R=!0),this._writeBuffer.writeSync(B,q)}input(B,q=!0){this.coreService.triggerDataEvent(B,q)}resize(B,q){isNaN(B)||isNaN(q)||(B=Math.max(B,S.MINIMUM_COLS),q=Math.max(q,S.MINIMUM_ROWS),this._bufferService.resize(B,q))}scroll(B,q=!1){this._bufferService.scroll(B,q)}scrollLines(B,q,$){this._bufferService.scrollLines(B,q,$)}scrollPages(B){this.scrollLines(B*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(B){const q=B-this._bufferService.buffer.ydisp;q!==0&&this.scrollLines(q)}registerEscHandler(B,q){return this._inputHandler.registerEscHandler(B,q)}registerDcsHandler(B,q){return this._inputHandler.registerDcsHandler(B,q)}registerCsiHandler(B,q){return this._inputHandler.registerCsiHandler(B,q)}registerOscHandler(B,q){return this._inputHandler.registerOscHandler(B,q)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let B=!1;const q=this.optionsService.rawOptions.windowsPty;q&&q.buildNumber!==void 0&&q.buildNumber!==void 0?B=q.backend==="conpty"&&q.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(B=!0),B?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const B=[];B.push(this.onLineFeed(k.updateWindowsModeWrappedState.bind(null,this._bufferService))),B.push(this.registerCsiHandler({final:"H"},(()=>((0,k.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const q of B)q.dispose()}))}}}a.CoreTerminal=j},8460:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===d)return void this._listeners.splice(f,1)}}})),this._event}fire(d,f){const p=[];for(let h=0;h<this._listeners.length;h++)p.push(this._listeners[h]);for(let h=0;h<p.length;h++)p[h].call(void 0,d,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,f){return d((p=>f.fire(p)))},a.runAndSubscribe=function(d,f){return f(void 0),d((p=>f(p)))}},5435:function(u,a,d){var f=this&&this.__decorate||function(Q,I,L,z){var H,F=arguments.length,J=F<3?I:z===null?z=Object.getOwnPropertyDescriptor(I,L):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")J=Reflect.decorate(Q,I,L,z);else for(var ne=Q.length-1;ne>=0;ne--)(H=Q[ne])&&(J=(F<3?H(J):F>3?H(I,L,J):H(I,L))||J);return F>3&&J&&Object.defineProperty(I,L,J),J},p=this&&this.__param||function(Q,I){return function(L,z){I(L,z,Q)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const h=d(2584),y=d(7116),S=d(2015),C=d(844),w=d(482),v=d(8437),b=d(8460),_=d(643),x=d(511),k=d(3734),N=d(2585),A=d(1480),M=d(6242),R=d(6351),j=d(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},B=131072;function q(Q,I){if(Q>24)return I.setWinLines||!1;switch(Q){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var $;(function(Q){Q[Q.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Q[Q.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})($||(a.WindowsOptionsReportType=$={}));let V=0;class K extends C.Disposable{getAttrData(){return this._curAttrData}constructor(I,L,z,H,F,J,ne,Z,W=new S.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=L,this._coreService=z,this._logService=H,this._optionsService=F,this._oscLinkService=J,this._coreMouseService=ne,this._unicodeService=Z,this._parser=W,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new w.StringToUtf32,this._utf8Decoder=new w.Utf8ToUtf32,this._workCell=new x.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((U=>this._activeBuffer=U.activeBuffer))),this._parser.setCsiHandlerFallback(((U,te)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(U),params:te.toArray()})})),this._parser.setEscHandlerFallback((U=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(U)})})),this._parser.setExecuteHandlerFallback((U=>{this._logService.debug("Unknown EXECUTE code: ",{code:U})})),this._parser.setOscHandlerFallback(((U,te,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:U,action:te,data:ie})})),this._parser.setDcsHandlerFallback(((U,te,ie)=>{te==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(U),action:te,payload:ie})})),this._parser.setPrintHandler(((U,te,ie)=>this.print(U,te,ie))),this._parser.registerCsiHandler({final:"@"},(U=>this.insertChars(U))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(U=>this.scrollLeft(U))),this._parser.registerCsiHandler({final:"A"},(U=>this.cursorUp(U))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(U=>this.scrollRight(U))),this._parser.registerCsiHandler({final:"B"},(U=>this.cursorDown(U))),this._parser.registerCsiHandler({final:"C"},(U=>this.cursorForward(U))),this._parser.registerCsiHandler({final:"D"},(U=>this.cursorBackward(U))),this._parser.registerCsiHandler({final:"E"},(U=>this.cursorNextLine(U))),this._parser.registerCsiHandler({final:"F"},(U=>this.cursorPrecedingLine(U))),this._parser.registerCsiHandler({final:"G"},(U=>this.cursorCharAbsolute(U))),this._parser.registerCsiHandler({final:"H"},(U=>this.cursorPosition(U))),this._parser.registerCsiHandler({final:"I"},(U=>this.cursorForwardTab(U))),this._parser.registerCsiHandler({final:"J"},(U=>this.eraseInDisplay(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(U=>this.eraseInDisplay(U,!0))),this._parser.registerCsiHandler({final:"K"},(U=>this.eraseInLine(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(U=>this.eraseInLine(U,!0))),this._parser.registerCsiHandler({final:"L"},(U=>this.insertLines(U))),this._parser.registerCsiHandler({final:"M"},(U=>this.deleteLines(U))),this._parser.registerCsiHandler({final:"P"},(U=>this.deleteChars(U))),this._parser.registerCsiHandler({final:"S"},(U=>this.scrollUp(U))),this._parser.registerCsiHandler({final:"T"},(U=>this.scrollDown(U))),this._parser.registerCsiHandler({final:"X"},(U=>this.eraseChars(U))),this._parser.registerCsiHandler({final:"Z"},(U=>this.cursorBackwardTab(U))),this._parser.registerCsiHandler({final:"`"},(U=>this.charPosAbsolute(U))),this._parser.registerCsiHandler({final:"a"},(U=>this.hPositionRelative(U))),this._parser.registerCsiHandler({final:"b"},(U=>this.repeatPrecedingCharacter(U))),this._parser.registerCsiHandler({final:"c"},(U=>this.sendDeviceAttributesPrimary(U))),this._parser.registerCsiHandler({prefix:">",final:"c"},(U=>this.sendDeviceAttributesSecondary(U))),this._parser.registerCsiHandler({final:"d"},(U=>this.linePosAbsolute(U))),this._parser.registerCsiHandler({final:"e"},(U=>this.vPositionRelative(U))),this._parser.registerCsiHandler({final:"f"},(U=>this.hVPosition(U))),this._parser.registerCsiHandler({final:"g"},(U=>this.tabClear(U))),this._parser.registerCsiHandler({final:"h"},(U=>this.setMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(U=>this.setModePrivate(U))),this._parser.registerCsiHandler({final:"l"},(U=>this.resetMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(U=>this.resetModePrivate(U))),this._parser.registerCsiHandler({final:"m"},(U=>this.charAttributes(U))),this._parser.registerCsiHandler({final:"n"},(U=>this.deviceStatus(U))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(U=>this.deviceStatusPrivate(U))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(U=>this.softReset(U))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(U=>this.setCursorStyle(U))),this._parser.registerCsiHandler({final:"r"},(U=>this.setScrollRegion(U))),this._parser.registerCsiHandler({final:"s"},(U=>this.saveCursor(U))),this._parser.registerCsiHandler({final:"t"},(U=>this.windowOptions(U))),this._parser.registerCsiHandler({final:"u"},(U=>this.restoreCursor(U))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(U=>this.insertColumns(U))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(U=>this.deleteColumns(U))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(U=>this.selectProtected(U))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(U=>this.requestMode(U,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(U=>this.requestMode(U,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new M.OscHandler((U=>(this.setTitle(U),this.setIconName(U),!0)))),this._parser.registerOscHandler(1,new M.OscHandler((U=>this.setIconName(U)))),this._parser.registerOscHandler(2,new M.OscHandler((U=>this.setTitle(U)))),this._parser.registerOscHandler(4,new M.OscHandler((U=>this.setOrReportIndexedColor(U)))),this._parser.registerOscHandler(8,new M.OscHandler((U=>this.setHyperlink(U)))),this._parser.registerOscHandler(10,new M.OscHandler((U=>this.setOrReportFgColor(U)))),this._parser.registerOscHandler(11,new M.OscHandler((U=>this.setOrReportBgColor(U)))),this._parser.registerOscHandler(12,new M.OscHandler((U=>this.setOrReportCursorColor(U)))),this._parser.registerOscHandler(104,new M.OscHandler((U=>this.restoreIndexedColor(U)))),this._parser.registerOscHandler(110,new M.OscHandler((U=>this.restoreFgColor(U)))),this._parser.registerOscHandler(111,new M.OscHandler((U=>this.restoreBgColor(U)))),this._parser.registerOscHandler(112,new M.OscHandler((U=>this.restoreCursorColor(U)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const U in y.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:U},(()=>this.selectCharset("("+U))),this._parser.registerEscHandler({intermediates:")",final:U},(()=>this.selectCharset(")"+U))),this._parser.registerEscHandler({intermediates:"*",final:U},(()=>this.selectCharset("*"+U))),this._parser.registerEscHandler({intermediates:"+",final:U},(()=>this.selectCharset("+"+U))),this._parser.registerEscHandler({intermediates:"-",final:U},(()=>this.selectCharset("-"+U))),this._parser.registerEscHandler({intermediates:".",final:U},(()=>this.selectCharset("."+U))),this._parser.registerEscHandler({intermediates:"/",final:U},(()=>this.selectCharset("/"+U)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((U=>(this._logService.error("Parsing error: ",U),U))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new R.DcsHandler(((U,te)=>this.requestStatusString(U,te))))}_preserveStack(I,L,z,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=z,this._parseStack.position=H}_logSlowResolvingAsync(I){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([I,new Promise(((L,z)=>setTimeout((()=>z("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(I,L){let z,H=this._activeBuffer.x,F=this._activeBuffer.y,J=0;const ne=this._parseStack.paused;if(ne){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(z),z;H=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>B&&(J=this._parseStack.position+B)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,(U=>String.fromCharCode(U))).join("")}"`),typeof I=="string"?I.split("").map((U=>U.charCodeAt(0))):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<B&&(this._parseBuffer=new Uint32Array(Math.min(I.length,B))),ne||this._dirtyRowTracker.clearRange(),I.length>B)for(let U=J;U<I.length;U+=B){const te=U+B<I.length?U+B:I.length,ie=typeof I=="string"?this._stringDecoder.decode(I.substring(U,te),this._parseBuffer):this._utf8Decoder.decode(I.subarray(U,te),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(H,F,ie,U),this._logSlowResolvingAsync(z),z}else if(!ne){const U=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,U))return this._preserveStack(H,F,U,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===H&&this._activeBuffer.y===F||this._onCursorMove.fire();const Z=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),W=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);W<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(W,this._bufferService.rows-1),Math.min(Z,this._bufferService.rows-1))}print(I,L,z){let H,F;const J=this._charsetService.charset,ne=this._optionsService.rawOptions.screenReaderMode,Z=this._bufferService.cols,W=this._coreService.decPrivateModes.wraparound,U=this._coreService.modes.insertMode,te=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-L>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,te);let ae=this._parser.precedingJoinState;for(let se=L;se<z;++se){if(H=I[se],H<127&&J){const Ke=J[String.fromCharCode(H)];Ke&&(H=Ke.charCodeAt(0))}const _e=this._unicodeService.charProperties(H,ae);F=A.UnicodeService.extractWidth(_e);const Te=A.UnicodeService.extractShouldJoin(_e),De=Te?A.UnicodeService.extractWidth(ae):0;if(ae=_e,ne&&this._onA11yChar.fire((0,w.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+F-De>Z){if(W){const Ke=ie;let Ae=this._activeBuffer.x-De;for(this._activeBuffer.x=De,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),De>0&&ie instanceof v.BufferLine&&ie.copyCellsFrom(Ke,Ae,0,De,!1);Ae<Z;)Ke.setCellFromCodepoint(Ae++,0,1,te)}else if(this._activeBuffer.x=Z-1,F===2)continue}if(Te&&this._activeBuffer.x){const Ke=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-Ke,H,F);for(let Ae=F-De;--Ae>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}else if(U&&(ie.insertCells(this._activeBuffer.x,F-De,this._activeBuffer.getNullCell(te)),ie.getWidth(Z-1)===2&&ie.setCellFromCodepoint(Z-1,_.NULL_CELL_CODE,_.NULL_CELL_WIDTH,te)),ie.setCellFromCodepoint(this._activeBuffer.x++,H,F,te),F>0)for(;--F;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}this._parser.precedingJoinState=ae,this._activeBuffer.x<Z&&z-L>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,te),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,L){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,L):this._parser.registerCsiHandler(I,(z=>!q(z.params[0],this._optionsService.rawOptions.windowOptions)||L(z)))}registerDcsHandler(I,L){return this._parser.registerDcsHandler(I,new R.DcsHandler(L))}registerEscHandler(I,L){return this._parser.registerEscHandler(I,L)}registerOscHandler(I,L){return this._parser.registerOscHandler(I,new M.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var I;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&I.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(I,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=I,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+L)}cursorUp(I){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const L=I.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const L=I.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,L,z,H=!1,F=!1){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);J.replaceCells(L,z,this._activeBuffer.getNullCell(this._eraseAttrData()),F),H&&(J.isWrapped=!1)}_resetBufferLine(I,L=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),z.isWrapped=!1)}eraseInDisplay(I,L=!1){let z;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);z<this._bufferService.rows;z++)this._resetBufferLine(z,L);this._dirtyRowTracker.markDirty(z);break;case 1:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,L);this._dirtyRowTracker.markDirty(0);break;case 3:const H=this._activeBuffer.lines.length-this._bufferService.rows;H>0&&(this._activeBuffer.lines.trimStart(H),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-H,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-H,0),this._onScroll.fire(0))}return!0}eraseInLine(I,L=!1){switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;L--;)this._activeBuffer.lines.splice(F-1,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y;let H;for(H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-H;L--;)this._activeBuffer.lines.splice(z,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let L=I.params[0]||1;for(;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(I){let L=I.params[0]||1;for(;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(v.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);H.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);H.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);H.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);H.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){const L=this._parser.precedingJoinState;if(!L)return!0;const z=I.params[0]||1,H=A.UnicodeService.extractWidth(L),F=this._activeBuffer.x-H,J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(F),ne=new Uint32Array(J.length*z);let Z=0;for(let U=0;U<J.length;){const te=J.codePointAt(U)||0;ne[Z++]=te,U+=te>65535?2:1}let W=Z;for(let U=1;U<z;++U)ne.copyWithin(W,0,Z),W+=Z;return this.print(ne,0,W),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),this._charsetService.setgCharset(1,y.DEFAULT_CHARSET),this._charsetService.setgCharset(2,y.DEFAULT_CHARSET),this._charsetService.setgCharset(3,y.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),I.params[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(I,L){const z=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:F}=this._coreMouseService,J=this._coreService,{buffers:ne,cols:Z}=this._bufferService,{active:W,alt:U}=ne,te=this._optionsService.rawOptions,ie=Te=>Te?1:2,ae=I.params[0];return se=ae,_e=L?ae===2?4:ae===4?ie(J.modes.insertMode):ae===12?3:ae===20?ie(te.convertEol):0:ae===1?ie(z.applicationCursorKeys):ae===3?te.windowOptions.setWinLines?Z===80?2:Z===132?1:0:0:ae===6?ie(z.origin):ae===7?ie(z.wraparound):ae===8?3:ae===9?ie(H==="X10"):ae===12?ie(te.cursorBlink):ae===25?ie(!J.isCursorHidden):ae===45?ie(z.reverseWraparound):ae===66?ie(z.applicationKeypad):ae===67?4:ae===1e3?ie(H==="VT200"):ae===1002?ie(H==="DRAG"):ae===1003?ie(H==="ANY"):ae===1004?ie(z.sendFocus):ae===1005?4:ae===1006?ie(F==="SGR"):ae===1015?4:ae===1016?ie(F==="SGR_PIXELS"):ae===1048?1:ae===47||ae===1047||ae===1049?ie(W===U):ae===2004?ie(z.bracketedPasteMode):0,J.triggerDataEvent(`${h.C0.ESC}[${L?"":"?"}${se};${_e}$y`),!0;var se,_e}_updateAttrColor(I,L,z,H,F){return L===2?(I|=50331648,I&=-16777216,I|=k.AttributeData.fromColorRGB([z,H,F])):L===5&&(I&=-50331904,I|=33554432|255&z),I}_extractColor(I,L,z){const H=[0,0,-1,0,0,0];let F=0,J=0;do{if(H[J+F]=I.params[L+J],I.hasSubParams(L+J)){const ne=I.getSubParams(L+J);let Z=0;do H[1]===5&&(F=1),H[J+Z+1+F]=ne[Z];while(++Z<ne.length&&Z+J+1+F<H.length);break}if(H[1]===5&&J+F>=2||H[1]===2&&J+F>=5)break;H[1]&&(F=1)}while(++J+L<I.length&&J+F<H.length);for(let ne=2;ne<H.length;++ne)H[ne]===-1&&(H[ne]=0);switch(H[0]){case 38:z.fg=this._updateAttrColor(z.fg,H[1],H[3],H[4],H[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,H[1],H[3],H[4],H[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,H[1],H[3],H[4],H[5])}return J}_processUnderline(I,L){L.extended=L.extended.clone(),(!~I||I>5)&&(I=1),L.extended.underlineStyle=I,L.fg|=268435456,I===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(I){I.fg=v.DEFAULT_ATTR_DATA.fg,I.bg=v.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=I.length;let z;const H=this._curAttrData;for(let F=0;F<L;F++)z=I.params[F],z>=30&&z<=37?(H.fg&=-50331904,H.fg|=16777216|z-30):z>=40&&z<=47?(H.bg&=-50331904,H.bg|=16777216|z-40):z>=90&&z<=97?(H.fg&=-50331904,H.fg|=16777224|z-90):z>=100&&z<=107?(H.bg&=-50331904,H.bg|=16777224|z-100):z===0?this._processSGR0(H):z===1?H.fg|=134217728:z===3?H.bg|=67108864:z===4?(H.fg|=268435456,this._processUnderline(I.hasSubParams(F)?I.getSubParams(F)[0]:1,H)):z===5?H.fg|=536870912:z===7?H.fg|=67108864:z===8?H.fg|=1073741824:z===9?H.fg|=2147483648:z===2?H.bg|=134217728:z===21?this._processUnderline(2,H):z===22?(H.fg&=-134217729,H.bg&=-134217729):z===23?H.bg&=-67108865:z===24?(H.fg&=-268435457,this._processUnderline(0,H)):z===25?H.fg&=-536870913:z===27?H.fg&=-67108865:z===28?H.fg&=-1073741825:z===29?H.fg&=2147483647:z===39?(H.fg&=-67108864,H.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):z===49?(H.bg&=-67108864,H.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?F+=this._extractColor(I,F,H):z===53?H.bg|=1073741824:z===55?H.bg&=-1073741825:z===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):z===100?(H.fg&=-67108864,H.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${L};${z}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const L=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${L};${z}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(I){const L=I.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const z=L%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(I){const L=I.params[0]||1;let z;return(I.length<2||(z=I.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=z-1,this._setCursor(0,0)),!0}windowOptions(I){if(!q(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire($.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire($.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(I){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const L=[],z=I.split(";");for(;z.length>1;){const H=z.shift(),F=z.shift();if(/^\d+$/.exec(H)){const J=parseInt(H);if(Y(J))if(F==="?")L.push({type:0,index:J});else{const ne=(0,j.parseColor)(F);ne&&L.push({type:1,index:J,color:ne})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(I){const L=I.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(I,L){this._getCurrentLinkId()&&this._finishHyperlink();const z=I.split(":");let H;const F=z.findIndex((J=>J.startsWith("id=")));return F!==-1&&(H=z[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(I,L){const z=I.split(";");for(let H=0;H<z.length&&!(L>=this._specialColors.length);++H,++L)if(z[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const F=(0,j.parseColor)(z[H]);F&&this._onColor.fire([{type:1,index:this._specialColors[L],color:F}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const L=[],z=I.split(";");for(let H=0;H<z.length;++H)if(/^\d+$/.exec(z[H])){const F=parseInt(z[H]);Y(F)&&L.push({type:2,index:F})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),!0}selectCharset(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(O[I[0]],y.CHARSETS[I[1]]||y.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new x.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const z=this._activeBuffer.ybase+this._activeBuffer.y+L,H=this._activeBuffer.lines.get(z);H&&(H.fill(I),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,L){const z=this._bufferService.buffer,H=this._optionsService.rawOptions;return(F=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${F}${h.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${z.scrollTop+1};${z.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,L){this._dirtyRowTracker.markRangeDirty(I,L)}}a.InputHandler=K;let G=class{constructor(Q){this._bufferService=Q,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Q){Q<this.start?this.start=Q:Q>this.end&&(this.end=Q)}markRangeDirty(Q,I){Q>I&&(V=Q,Q=I,I=V),Q<this.start&&(this.start=Q),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Y(Q){return 0<=Q&&Q<256}G=f([p(0,N.IBufferService)],G)},844:(u,a)=>{function d(f){for(const p of f)p.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const p=this._disposables.indexOf(f);p!==-1&&this._disposables.splice(p,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var p;this._isDisposed||f===this._value||((p=this._value)==null||p.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=d,a.getDisposeArrayDisposable=function(f){return{dispose:()=>d(f)}}},1505:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(p,h,y){this._data[p]||(this._data[p]={}),this._data[p][h]=y}get(p,h){return this._data[p]?this._data[p][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(f,p,h,y,S){this._data.get(f,p)||this._data.set(f,p,new d),this._data.get(f,p).set(h,y,S)}get(f,p,h,y){var S;return(S=this._data.get(f,p))==null?void 0:S.get(h,y)}clear(){this._data.clear()}}},6114:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const p=d.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},6106:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let d=0;a.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(d=this._search(this._getKey(f)),this._array.splice(d,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const p=this._getKey(f);if(p===void 0||(d=this._search(p),d===-1)||this._getKey(this._array[d])!==p)return!1;do if(this._array[d]===f)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===p);return!1}*getKeyIterator(f){if(this._array.length!==0&&(d=this._search(f),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===f))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===f)}forEachByKey(f,p){if(this._array.length!==0&&(d=this._search(f),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===f))do p(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===f)}values(){return[...this._array].values()}_search(f){let p=0,h=this._array.length-1;for(;h>=p;){let y=p+h>>1;const S=this._getKey(this._array[y]);if(S>f)h=y-1;else{if(!(S<f)){for(;y>0&&this._getKey(this._array[y-1])===f;)y--;return y}p=y+1}}return p}}},7226:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=d(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(S){this._idleCallback=void 0;let C=0,w=0,v=S.timeRemaining(),b=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),w=Math.max(C,w),b=S.timeRemaining(),1.5*w>b)return v-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-C))}ms`),void this._start();v=b}this.clear()}}class h extends p{_requestCallback(S){return setTimeout((()=>S(this._createDeadline(16))))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const C=Date.now()+S;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(y){return requestIdleCallback(y)}_cancelCallback(y){cancelIdleCallback(y)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(y){this._queue.clear(),this._queue.enqueue(y)}flush(){this._queue.flush()}}},9282:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const f=d(643);a.updateWindowsModeWrappedState=function(p){const h=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),y=h==null?void 0:h.get(p.cols-1),S=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);S&&y&&(S.isWrapped=y[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&y[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new d;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,y=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=y}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},9092:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const f=d(6349),p=d(7226),h=d(3734),y=d(8437),S=d(4634),C=d(511),w=d(643),v=d(4863),b=d(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(_,x,k){this._hasScrollback=_,this._optionsService=x,this._bufferService=k,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,w.NULL_CELL_CHAR,w.NULL_CELL_WIDTH,w.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,w.WHITESPACE_CELL_CHAR,w.WHITESPACE_CELL_WIDTH,w.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(_){return _?(this._nullCell.fg=_.fg,this._nullCell.bg=_.bg,this._nullCell.extended=_.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(_){return _?(this._whitespaceCell.fg=_.fg,this._whitespaceCell.bg=_.bg,this._whitespaceCell.extended=_.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(_,x){return new y.BufferLine(this._bufferService.cols,this.getNullCell(_),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const _=this.ybase+this.y-this.ydisp;return _>=0&&_<this._rows}_getCorrectBufferLength(_){if(!this._hasScrollback)return _;const x=_+this._optionsService.rawOptions.scrollback;return x>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:x}fillViewportRows(_){if(this.lines.length===0){_===void 0&&(_=y.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(_))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(_,x){const k=this.getNullCell(y.DEFAULT_ATTR_DATA);let N=0;const A=this._getCorrectBufferLength(x);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<_)for(let R=0;R<this.lines.length;R++)N+=+this.lines.get(R).resize(_,k);let M=0;if(this._rows<x)for(let R=this._rows;R<x;R++)this.lines.length<x+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new y.BufferLine(_,k)):this.ybase>0&&this.lines.length<=this.ybase+this.y+M+1?(this.ybase--,M++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(_,k)));else for(let R=this._rows;R>x;R--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const R=this.lines.length-A;R>0&&(this.lines.trimStart(R),this.ybase=Math.max(this.ybase-R,0),this.ydisp=Math.max(this.ydisp-R,0),this.savedY=Math.max(this.savedY-R,0)),this.lines.maxLength=A}this.x=Math.min(this.x,_-1),this.y=Math.min(this.y,x-1),M&&(this.y+=M),this.savedX=Math.min(this.savedX,_-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(_,x),this._cols>_))for(let M=0;M<this.lines.length;M++)N+=+this.lines.get(M).resize(_,k);this._cols=_,this._rows=x,this._memoryCleanupQueue.clear(),N>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let _=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,_=!1);let x=0;for(;this._memoryCleanupPosition<this.lines.length;)if(x+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),x>100)return!0;return _}get _isReflowEnabled(){const _=this._optionsService.rawOptions.windowsPty;return _&&_.buildNumber?this._hasScrollback&&_.backend==="conpty"&&_.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(_,x){this._cols!==_&&(_>this._cols?this._reflowLarger(_,x):this._reflowSmaller(_,x))}_reflowLarger(_,x){const k=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,_,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(k.length>0){const N=(0,S.reflowLargerCreateNewLayout)(this.lines,k);(0,S.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(_,x,N.countRemoved)}}_reflowLargerAdjustViewport(_,x,k){const N=this.getNullCell(y.DEFAULT_ATTR_DATA);let A=k;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<x&&this.lines.push(new y.BufferLine(_,N))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-k,0)}_reflowSmaller(_,x){const k=this.getNullCell(y.DEFAULT_ATTR_DATA),N=[];let A=0;for(let M=this.lines.length-1;M>=0;M--){let R=this.lines.get(M);if(!R||!R.isWrapped&&R.getTrimmedLength()<=_)continue;const j=[R];for(;R.isWrapped&&M>0;)R=this.lines.get(--M),j.unshift(R);const O=this.ybase+this.y;if(O>=M&&O<M+j.length)continue;const B=j[j.length-1].getTrimmedLength(),q=(0,S.reflowSmallerGetNewLineLengths)(j,this._cols,_),$=q.length-j.length;let V;V=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+$):Math.max(0,this.lines.length-this.lines.maxLength+$);const K=[];for(let z=0;z<$;z++){const H=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);K.push(H)}K.length>0&&(N.push({start:M+j.length+A,newLines:K}),A+=K.length),j.push(...K);let G=q.length-1,Y=q[G];Y===0&&(G--,Y=q[G]);let Q=j.length-$-1,I=B;for(;Q>=0;){const z=Math.min(I,Y);if(j[G]===void 0)break;if(j[G].copyCellsFrom(j[Q],I-z,Y-z,z,!0),Y-=z,Y===0&&(G--,Y=q[G]),I-=z,I===0){Q--;const H=Math.max(Q,0);I=(0,S.getWrappedLineTrimmedLength)(j,H,this._cols)}}for(let z=0;z<j.length;z++)q[z]<_&&j[z].setCell(q[z],k);let L=$-V;for(;L-- >0;)this.ybase===0?this.y<x-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-x&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+$,this.ybase+x-1)}if(N.length>0){const M=[],R=[];for(let G=0;G<this.lines.length;G++)R.push(this.lines.get(G));const j=this.lines.length;let O=j-1,B=0,q=N[B];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let $=0;for(let G=Math.min(this.lines.maxLength-1,j+A-1);G>=0;G--)if(q&&q.start>O+$){for(let Y=q.newLines.length-1;Y>=0;Y--)this.lines.set(G--,q.newLines[Y]);G++,M.push({index:O+1,amount:q.newLines.length}),$+=q.newLines.length,q=N[++B]}else this.lines.set(G,R[O--]);let V=0;for(let G=M.length-1;G>=0;G--)M[G].index+=V,this.lines.onInsertEmitter.fire(M[G]),V+=M[G].amount;const K=Math.max(0,j+A-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(_,x,k=0,N){const A=this.lines.get(_);return A?A.translateToString(x,k,N):""}getWrappedRangeForLine(_){let x=_,k=_;for(;x>0&&this.lines.get(x).isWrapped;)x--;for(;k+1<this.lines.length&&this.lines.get(k+1).isWrapped;)k++;return{first:x,last:k}}setupTabStops(_){for(_!=null?this.tabs[_]||(_=this.prevStop(_)):(this.tabs={},_=0);_<this._cols;_+=this._optionsService.rawOptions.tabStopWidth)this.tabs[_]=!0}prevStop(_){for(_==null&&(_=this.x);!this.tabs[--_]&&_>0;);return _>=this._cols?this._cols-1:_<0?0:_}nextStop(_){for(_==null&&(_=this.x);!this.tabs[++_]&&_<this._cols;);return _>=this._cols?this._cols-1:_<0?0:_}clearMarkers(_){this._isClearing=!0;for(let x=0;x<this.markers.length;x++)this.markers[x].line===_&&(this.markers[x].dispose(),this.markers.splice(x--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let _=0;_<this.markers.length;_++)this.markers[_].dispose(),this.markers.splice(_--,1);this._isClearing=!1}addMarker(_){const x=new v.Marker(_);return this.markers.push(x),x.register(this.lines.onTrim((k=>{x.line-=k,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((k=>{x.line>=k.index&&(x.line+=k.amount)}))),x.register(this.lines.onDelete((k=>{x.line>=k.index&&x.line<k.index+k.amount&&x.dispose(),x.line>k.index&&(x.line-=k.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(_){this._isClearing||this.markers.splice(this.markers.indexOf(_),1)}}},8437:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const f=d(3734),p=d(511),h=d(643),y=d(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class C{constructor(v,b,_=!1){this.isWrapped=_,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const x=b||p.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let k=0;k<v;++k)this.setCell(k,x);this.length=v}get(v){const b=this._data[3*v+0],_=2097151&b;return[this._data[3*v+1],2097152&b?this._combined[v]:_?(0,y.stringFromCodePoint)(_):"",b>>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):_]}set(v,b){this._data[3*v+1]=b[h.CHAR_DATA_ATTR_INDEX],b[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,y.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return S=3*v,b.content=this._data[S+0],b.fg=this._data[S+1],b.bg=this._data[S+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,_,x){268435456&x.bg&&(this._extendedAttrs[v]=x.extended),this._data[3*v+0]=b|_<<22,this._data[3*v+1]=x.fg,this._data[3*v+2]=x.bg}addCodepointToCell(v,b,_){let x=this._data[3*v+0];2097152&x?this._combined[v]+=(0,y.stringFromCodePoint)(b):2097151&x?(this._combined[v]=(0,y.stringFromCodePoint)(2097151&x)+(0,y.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,_&&(x&=-12582913,x|=_<<22),this._data[3*v+0]=x}insertCells(v,b,_){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,_),b<this.length-v){const x=new p.CellData;for(let k=this.length-v-b-1;k>=0;--k)this.setCell(v+b+k,this.loadCell(v+k,x));for(let k=0;k<b;++k)this.setCell(v+k,_)}else for(let x=v;x<this.length;++x)this.setCell(x,_);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,_)}deleteCells(v,b,_){if(v%=this.length,b<this.length-v){const x=new p.CellData;for(let k=0;k<this.length-v-b;++k)this.setCell(v+k,this.loadCell(v+b+k,x));for(let k=this.length-b;k<this.length;++k)this.setCell(k,_)}else for(let x=v;x<this.length;++x)this.setCell(x,_);v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,_),this.getWidth(v)!==0||this.hasContent(v)||this.setCellFromCodepoint(v,0,1,_)}replaceCells(v,b,_,x=!1){if(x)for(v&&this.getWidth(v-1)===2&&!this.isProtected(v-1)&&this.setCellFromCodepoint(v-1,0,1,_),b<this.length&&this.getWidth(b-1)===2&&!this.isProtected(b)&&this.setCellFromCodepoint(b,0,1,_);v<b&&v<this.length;)this.isProtected(v)||this.setCell(v,_),v++;else for(v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,_),b<this.length&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b,0,1,_);v<b&&v<this.length;)this.setCell(v++,_)}resize(v,b){if(v===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const _=3*v;if(v>this.length){if(this._data.buffer.byteLength>=4*_)this._data=new Uint32Array(this._data.buffer,0,_);else{const x=new Uint32Array(_);x.set(this._data),this._data=x}for(let x=this.length;x<v;++x)this.setCell(x,b)}else{this._data=this._data.subarray(0,_);const x=Object.keys(this._combined);for(let N=0;N<x.length;N++){const A=parseInt(x[N],10);A>=v&&delete this._combined[A]}const k=Object.keys(this._extendedAttrs);for(let N=0;N<k.length;N++){const A=parseInt(k[N],10);A>=v&&delete this._extendedAttrs[A]}}return this.length=v,4*_*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const v=new Uint32Array(this._data.length);return v.set(this._data),this._data=v,1}return 0}fill(v,b=!1){if(b)for(let _=0;_<this.length;++_)this.isProtected(_)||this.setCell(_,v);else{this._combined={},this._extendedAttrs={};for(let _=0;_<this.length;++_)this.setCell(_,v)}}copyFrom(v){this.length!==v.length?this._data=new Uint32Array(v._data):this._data.set(v._data),this.length=v.length,this._combined={};for(const b in v._combined)this._combined[b]=v._combined[b];this._extendedAttrs={};for(const b in v._extendedAttrs)this._extendedAttrs[b]=v._extendedAttrs[b];this.isWrapped=v.isWrapped}clone(){const v=new C(0);v._data=new Uint32Array(this._data),v.length=this.length;for(const b in this._combined)v._combined[b]=this._combined[b];for(const b in this._extendedAttrs)v._extendedAttrs[b]=this._extendedAttrs[b];return v.isWrapped=this.isWrapped,v}getTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,b,_,x,k){const N=v._data;if(k)for(let M=x-1;M>=0;M--){for(let R=0;R<3;R++)this._data[3*(_+M)+R]=N[3*(b+M)+R];268435456&N[3*(b+M)+2]&&(this._extendedAttrs[_+M]=v._extendedAttrs[b+M])}else for(let M=0;M<x;M++){for(let R=0;R<3;R++)this._data[3*(_+M)+R]=N[3*(b+M)+R];268435456&N[3*(b+M)+2]&&(this._extendedAttrs[_+M]=v._extendedAttrs[b+M])}const A=Object.keys(v._combined);for(let M=0;M<A.length;M++){const R=parseInt(A[M],10);R>=b&&(this._combined[R-b+_]=v._combined[R])}}translateToString(v,b,_,x){b=b!=null?b:0,_=_!=null?_:this.length,v&&(_=Math.min(_,this.getTrimmedLength())),x&&(x.length=0);let k="";for(;b<_;){const N=this._data[3*b+0],A=2097151&N,M=2097152&N?this._combined[b]:A?(0,y.stringFromCodePoint)(A):h.WHITESPACE_CELL_CHAR;if(k+=M,x)for(let R=0;R<M.length;++R)x.push(b);b+=N>>22||1}return x&&x.push(b),k}}a.BufferLine=C},4841:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(d,f){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return f*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(u,a)=>{function d(f,p,h){if(p===f.length-1)return f[p].getTrimmedLength();const y=!f[p].hasContent(h-1)&&f[p].getWidth(h-1)===1,S=f[p+1].getWidth(0)===2;return y&&S?h-1:h}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(f,p,h,y,S){const C=[];for(let w=0;w<f.length-1;w++){let v=w,b=f.get(++v);if(!b.isWrapped)continue;const _=[f.get(w)];for(;v<f.length&&b.isWrapped;)_.push(b),b=f.get(++v);if(y>=w&&y<v){w+=_.length-1;continue}let x=0,k=d(_,x,p),N=1,A=0;for(;N<_.length;){const R=d(_,N,p),j=R-A,O=h-k,B=Math.min(j,O);_[x].copyCellsFrom(_[N],A,k,B,!1),k+=B,k===h&&(x++,k=0),A+=B,A===R&&(N++,A=0),k===0&&x!==0&&_[x-1].getWidth(h-1)===2&&(_[x].copyCellsFrom(_[x-1],h-1,k++,1,!1),_[x-1].setCell(h-1,S))}_[x].replaceCells(k,h,S);let M=0;for(let R=_.length-1;R>0&&(R>x||_[R].getTrimmedLength()===0);R--)M++;M>0&&(C.push(w+_.length-M),C.push(M)),w+=_.length-1}return C},a.reflowLargerCreateNewLayout=function(f,p){const h=[];let y=0,S=p[y],C=0;for(let w=0;w<f.length;w++)if(S===w){const v=p[++y];f.onDeleteEmitter.fire({index:w-C,amount:v}),w+=v-1,C+=v,S=p[++y]}else h.push(w);return{layout:h,countRemoved:C}},a.reflowLargerApplyNewLayout=function(f,p){const h=[];for(let y=0;y<p.length;y++)h.push(f.get(p[y]));for(let y=0;y<h.length;y++)f.set(y,h[y]);f.length=p.length},a.reflowSmallerGetNewLineLengths=function(f,p,h){const y=[],S=f.map(((b,_)=>d(f,_,p))).reduce(((b,_)=>b+_));let C=0,w=0,v=0;for(;v<S;){if(S-v<h){y.push(S-v);break}C+=h;const b=d(f,w,p);C>b&&(C-=b,w++);const _=f[w].getWidth(C-1)===2;_&&C--;const x=_?h-1:h;y.push(x),v+=x}return y},a.getWrappedLineTrimmedLength=d},5295:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const f=d(8460),p=d(844),h=d(9092);class y extends p.Disposable{constructor(C,w){super(),this._optionsService=C,this._bufferService=w,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(C){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(C),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(C,w){this._normal.resize(C,w),this._alt.resize(C,w),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}a.BufferSet=y},511:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=d(482),p=d(643),h=d(3734);class y extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const w=new y;return w.setFromCharData(C),w}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let w=!1;if(C[p.CHAR_DATA_CHAR_INDEX].length>2)w=!0;else if(C[p.CHAR_DATA_CHAR_INDEX].length===2){const v=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|C[p.CHAR_DATA_WIDTH_INDEX]<<22:w=!0}else w=!0}else this.content=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[p.CHAR_DATA_WIDTH_INDEX]<<22;w&&(this.combinedData=C[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=y},643:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const f=d(8460),p=d(844);class h{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}a.Marker=h,h._nextId=1},7116:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(u,a)=>{var d,f,p;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
513
|
+
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(d||(a.C0=d={})),(function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""})(f||(a.C1=f={})),(function(h){h.ST=`${d.ESC}\\`})(p||(a.C1_ESCAPED=p={}))},7399:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const f=d(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(h,y,S,C){const w={type:0,cancel:!1,key:void 0},v=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?w.key=y?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?w.key=y?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?w.key=y?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(w.key=y?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:w.key=h.ctrlKey?"\b":f.C0.DEL,h.altKey&&(w.key=f.C0.ESC+w.key);break;case 9:if(h.shiftKey){w.key=f.C0.ESC+"[Z";break}w.key=f.C0.HT,w.cancel=!0;break;case 13:w.key=h.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,w.cancel=!0;break;case 27:w.key=f.C0.ESC,h.altKey&&(w.key=f.C0.ESC+f.C0.ESC),w.cancel=!0;break;case 37:if(h.metaKey)break;v?(w.key=f.C0.ESC+"[1;"+(v+1)+"D",w.key===f.C0.ESC+"[1;3D"&&(w.key=f.C0.ESC+(S?"b":"[1;5D"))):w.key=y?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(h.metaKey)break;v?(w.key=f.C0.ESC+"[1;"+(v+1)+"C",w.key===f.C0.ESC+"[1;3C"&&(w.key=f.C0.ESC+(S?"f":"[1;5C"))):w.key=y?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(h.metaKey)break;v?(w.key=f.C0.ESC+"[1;"+(v+1)+"A",S||w.key!==f.C0.ESC+"[1;3A"||(w.key=f.C0.ESC+"[1;5A")):w.key=y?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(h.metaKey)break;v?(w.key=f.C0.ESC+"[1;"+(v+1)+"B",S||w.key!==f.C0.ESC+"[1;3B"||(w.key=f.C0.ESC+"[1;5B")):w.key=y?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(w.key=f.C0.ESC+"[2~");break;case 46:w.key=v?f.C0.ESC+"[3;"+(v+1)+"~":f.C0.ESC+"[3~";break;case 36:w.key=v?f.C0.ESC+"[1;"+(v+1)+"H":y?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:w.key=v?f.C0.ESC+"[1;"+(v+1)+"F":y?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:h.shiftKey?w.type=2:h.ctrlKey?w.key=f.C0.ESC+"[5;"+(v+1)+"~":w.key=f.C0.ESC+"[5~";break;case 34:h.shiftKey?w.type=3:h.ctrlKey?w.key=f.C0.ESC+"[6;"+(v+1)+"~":w.key=f.C0.ESC+"[6~";break;case 112:w.key=v?f.C0.ESC+"[1;"+(v+1)+"P":f.C0.ESC+"OP";break;case 113:w.key=v?f.C0.ESC+"[1;"+(v+1)+"Q":f.C0.ESC+"OQ";break;case 114:w.key=v?f.C0.ESC+"[1;"+(v+1)+"R":f.C0.ESC+"OR";break;case 115:w.key=v?f.C0.ESC+"[1;"+(v+1)+"S":f.C0.ESC+"OS";break;case 116:w.key=v?f.C0.ESC+"[15;"+(v+1)+"~":f.C0.ESC+"[15~";break;case 117:w.key=v?f.C0.ESC+"[17;"+(v+1)+"~":f.C0.ESC+"[17~";break;case 118:w.key=v?f.C0.ESC+"[18;"+(v+1)+"~":f.C0.ESC+"[18~";break;case 119:w.key=v?f.C0.ESC+"[19;"+(v+1)+"~":f.C0.ESC+"[19~";break;case 120:w.key=v?f.C0.ESC+"[20;"+(v+1)+"~":f.C0.ESC+"[20~";break;case 121:w.key=v?f.C0.ESC+"[21;"+(v+1)+"~":f.C0.ESC+"[21~";break;case 122:w.key=v?f.C0.ESC+"[23;"+(v+1)+"~":f.C0.ESC+"[23~";break;case 123:w.key=v?f.C0.ESC+"[24;"+(v+1)+"~":f.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(S&&!C||!h.altKey||h.metaKey)!S||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?w.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(w.key=f.C0.US),h.key==="@"&&(w.key=f.C0.NUL)):h.keyCode===65&&(w.type=1);else{const b=p[h.keyCode],_=b==null?void 0:b[h.shiftKey?1:0];if(_)w.key=f.C0.ESC+_;else if(h.keyCode>=65&&h.keyCode<=90){const x=h.ctrlKey?h.keyCode-64:h.keyCode+32;let k=String.fromCharCode(x);h.shiftKey&&(k=k.toUpperCase()),w.key=f.C0.ESC+k}else if(h.keyCode===32)w.key=f.C0.ESC+(h.ctrlKey?f.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let x=h.code.slice(3,4);h.shiftKey||(x=x.toLowerCase()),w.key=f.C0.ESC+x,w.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?w.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?w.key=f.C0.NUL:h.keyCode>=51&&h.keyCode<=55?w.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?w.key=f.C0.DEL:h.keyCode===219?w.key=f.C0.ESC:h.keyCode===220?w.key=f.C0.FS:h.keyCode===221&&(w.key=f.C0.GS)}return w}},482:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,f=0,p=d.length){let h="";for(let y=f;y<p;++y){let S=d[y];S>65535?(S-=65536,h+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):h+=String.fromCharCode(S)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,f){const p=d.length;if(!p)return 0;let h=0,y=0;if(this._interim){const S=d.charCodeAt(y++);56320<=S&&S<=57343?f[h++]=1024*(this._interim-55296)+S-56320+65536:(f[h++]=this._interim,f[h++]=S),this._interim=0}for(let S=y;S<p;++S){const C=d.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=p)return this._interim=C,h;const w=d.charCodeAt(S);56320<=w&&w<=57343?f[h++]=1024*(C-55296)+w-56320+65536:(f[h++]=C,f[h++]=w)}else C!==65279&&(f[h++]=C)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,f){const p=d.length;if(!p)return 0;let h,y,S,C,w=0,v=0,b=0;if(this.interim[0]){let k=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let A,M=0;for(;(A=63&this.interim[++M])&&M<4;)N<<=6,N|=A;const R=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,j=R-M;for(;b<j;){if(b>=p)return 0;if(A=d[b++],(192&A)!=128){b--,k=!0;break}this.interim[M++]=A,N<<=6,N|=63&A}k||(R===2?N<128?b--:f[w++]=N:R===3?N<2048||N>=55296&&N<=57343||N===65279||(f[w++]=N):N<65536||N>1114111||(f[w++]=N)),this.interim.fill(0)}const _=p-4;let x=b;for(;x<p;){for(;!(!(x<_)||128&(h=d[x])||128&(y=d[x+1])||128&(S=d[x+2])||128&(C=d[x+3]));)f[w++]=h,f[w++]=y,f[w++]=S,f[w++]=C,x+=4;if(h=d[x++],h<128)f[w++]=h;else if((224&h)==192){if(x>=p)return this.interim[0]=h,w;if(y=d[x++],(192&y)!=128){x--;continue}if(v=(31&h)<<6|63&y,v<128){x--;continue}f[w++]=v}else if((240&h)==224){if(x>=p)return this.interim[0]=h,w;if(y=d[x++],(192&y)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,w;if(S=d[x++],(192&S)!=128){x--;continue}if(v=(15&h)<<12|(63&y)<<6|63&S,v<2048||v>=55296&&v<=57343||v===65279)continue;f[w++]=v}else if((248&h)==240){if(x>=p)return this.interim[0]=h,w;if(y=d[x++],(192&y)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,w;if(S=d[x++],(192&S)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,this.interim[2]=S,w;if(C=d[x++],(192&C)!=128){x--;continue}if(v=(7&h)<<18|(63&y)<<12|(63&S)<<6|63&C,v<65536||v>1114111)continue;f[w++]=v}}return w}}},225:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const f=d(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let y;a.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let S=0;S<p.length;++S)y.fill(0,p[S][0],p[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?y[S]:(function(C,w){let v,b=0,_=w.length-1;if(C<w[0][0]||C>w[_][1])return!1;for(;_>=b;)if(v=b+_>>1,C>w[v][1])b=v+1;else{if(!(C<w[v][0]))return!0;_=v-1}return!1})(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,C){let w=this.wcwidth(S),v=w===0&&C!==0;if(v){const b=f.UnicodeService.extractWidth(C);b===0?v=!1:b>w&&(w=b)}return f.UnicodeService.createPropertyValue(0,w,v)}}},5981:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const f=d(8460),p=d(844);class h extends p.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,C){if(C!==void 0&&this._syncCalls>C)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let w;for(this._isSyncWriting=!0;w=this._writeBuffer.shift();){this._action(w);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,C){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(C),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(C)}_innerWrite(S=0,C=!0){const w=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],b=this._action(v,C);if(b){const x=k=>Date.now()-w>=12?setTimeout((()=>this._innerWrite(0,k))):this._innerWrite(w,k);return void b.catch((k=>(queueMicrotask((()=>{throw k})),Promise.resolve(!1)))).then(x)}const _=this._callbacks[this._bufferOffset];if(_&&_(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-w>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=h},5941:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const d=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function p(h,y){const S=h.toString(16),C=S.length<2?"0"+S:S;switch(y){case 4:return S[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}a.parseColor=function(h){if(!h)return;let y=h.toLowerCase();if(y.indexOf("rgb:")===0){y=y.slice(4);const S=d.exec(y);if(S){const C=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/C*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/C*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/C*255)]}}else if(y.indexOf("#")===0&&(y=y.slice(1),f.exec(y)&&[3,6,9,12].includes(y.length))){const S=y.length/3,C=[0,0,0];for(let w=0;w<3;++w){const v=parseInt(y.slice(S*w,S*w+S),16);C[w]=S===1?v<<4:S===2?v:S===3?v>>4:v>>8}return C}},a.toRgbString=function(h,y=16){const[S,C,w]=h;return`rgb:${p(S,y)}/${p(C,y)}/${p(w,y)}`}},5770:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const f=d(482),p=d(8742),h=d(5770),y=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=y,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=y}registerHandler(C,w){this._handlers[C]===void 0&&(this._handlers[C]=[]);const v=this._handlers[C];return v.push(w),{dispose:()=>{const b=v.indexOf(w);b!==-1&&v.splice(b,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}reset(){if(this._active.length)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].unhook(!1);this._stack.paused=!1,this._active=y,this._ident=0}hook(C,w){if(this.reset(),this._ident=C,this._active=this._handlers[C]||y,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(w);else this._handlerFb(this._ident,"HOOK",w)}put(C,w,v){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(C,w,v);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(C,w,v))}unhook(C,w=!0){if(this._active.length){let v=!1,b=this._active.length-1,_=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=w,_=this._stack.fallThrough,this._stack.paused=!1),!_&&v===!1){for(;b>=0&&(v=this._active[b].unhook(C),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",C);this._active=y,this._ident=0}};const S=new p.Params;S.addParam(0),a.DcsHandler=class{constructor(C){this._handler=C,this._data="",this._params=S,this._hitLimit=!1}hook(C){this._params=C.length>1||C.params[0]?C.clone():S,this._data="",this._hitLimit=!1}put(C,w,v){this._hitLimit||(this._data+=(0,f.utf32ToString)(C,w,v),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let w=!1;if(this._hitLimit)w=!1;else if(C&&(w=this._handler(this._data,this._params),w instanceof Promise))return w.then((v=>(this._params=S,this._data="",this._hitLimit=!1,v)));return this._params=S,this._data="",this._hitLimit=!1,w}}},2015:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const f=d(844),p=d(8742),h=d(6242),y=d(6351);class S{constructor(b){this.table=new Uint8Array(b)}setDefault(b,_){this.table.fill(b<<4|_)}add(b,_,x,k){this.table[_<<8|b]=x<<4|k}addMany(b,_,x,k){for(let N=0;N<b.length;N++)this.table[_<<8|b[N]]=x<<4|k}}a.TransitionTable=S;const C=160;a.VT500_TRANSITION_TABLE=(function(){const v=new S(4095),b=Array.apply(null,Array(256)).map(((M,R)=>R)),_=(M,R)=>b.slice(M,R),x=_(32,127),k=_(0,24);k.push(25),k.push.apply(k,_(28,32));const N=_(0,14);let A;for(A in v.setDefault(1,0),v.addMany(x,0,2,0),N)v.addMany([24,26,153,154],A,3,0),v.addMany(_(128,144),A,3,0),v.addMany(_(144,152),A,3,0),v.add(156,A,0,0),v.add(27,A,11,1),v.add(157,A,4,8),v.addMany([152,158,159],A,0,7),v.add(155,A,11,3),v.add(144,A,11,9);return v.addMany(k,0,3,0),v.addMany(k,1,3,1),v.add(127,1,0,1),v.addMany(k,8,0,8),v.addMany(k,3,3,3),v.add(127,3,0,3),v.addMany(k,4,3,4),v.add(127,4,0,4),v.addMany(k,6,3,6),v.addMany(k,5,3,5),v.add(127,5,0,5),v.addMany(k,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(x,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(_(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(x,7,0,7),v.addMany(k,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(_(64,127),3,7,0),v.addMany(_(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(_(48,60),4,8,4),v.addMany(_(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(_(32,64),6,0,6),v.add(127,6,0,6),v.addMany(_(64,127),6,0,0),v.addMany(_(32,48),3,9,5),v.addMany(_(32,48),5,9,5),v.addMany(_(48,64),5,0,6),v.addMany(_(64,127),5,7,0),v.addMany(_(32,48),4,9,5),v.addMany(_(32,48),1,9,2),v.addMany(_(32,48),2,9,2),v.addMany(_(48,127),2,10,0),v.addMany(_(48,80),1,10,0),v.addMany(_(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(_(96,127),1,10,0),v.add(80,1,11,9),v.addMany(k,9,0,9),v.add(127,9,0,9),v.addMany(_(28,32),9,0,9),v.addMany(_(32,48),9,9,12),v.addMany(_(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(k,11,0,11),v.addMany(_(32,128),11,0,11),v.addMany(_(28,32),11,0,11),v.addMany(k,10,0,10),v.add(127,10,0,10),v.addMany(_(28,32),10,0,10),v.addMany(_(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(_(32,48),10,9,12),v.addMany(k,12,0,12),v.add(127,12,0,12),v.addMany(_(28,32),12,0,12),v.addMany(_(32,48),12,9,12),v.addMany(_(48,64),12,0,11),v.addMany(_(64,127),12,12,13),v.addMany(_(64,127),10,12,13),v.addMany(_(64,127),9,12,13),v.addMany(k,13,13,13),v.addMany(x,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(C,0,2,0),v.add(C,8,5,8),v.add(C,6,0,6),v.add(C,11,0,11),v.add(C,13,13,13),v})();class w extends f.Disposable{constructor(b=a.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(_,x,k)=>{},this._executeHandlerFb=_=>{},this._csiHandlerFb=(_,x)=>{},this._escHandlerFb=_=>{},this._errorHandlerFb=_=>_,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new y.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,_=[64,126]){let x=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(x=b.prefix.charCodeAt(0),x&&60>x||x>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;N<b.intermediates.length;++N){const A=b.intermediates.charCodeAt(N);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");x<<=8,x|=A}}if(b.final.length!==1)throw new Error("final must be a single byte");const k=b.final.charCodeAt(0);if(_[0]>k||k>_[1])throw new Error(`final must be in range ${_[0]} .. ${_[1]}`);return x<<=8,x|=k,x}identToString(b){const _=[];for(;b;)_.push(String.fromCharCode(255&b)),b>>=8;return _.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,_){const x=this._identifier(b,[48,126]);this._escHandlers[x]===void 0&&(this._escHandlers[x]=[]);const k=this._escHandlers[x];return k.push(_),{dispose:()=>{const N=k.indexOf(_);N!==-1&&k.splice(N,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,_){this._executeHandlers[b.charCodeAt(0)]=_}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,_){const x=this._identifier(b);this._csiHandlers[x]===void 0&&(this._csiHandlers[x]=[]);const k=this._csiHandlers[x];return k.push(_),{dispose:()=>{const N=k.indexOf(_);N!==-1&&k.splice(N,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,_){return this._dcsParser.registerHandler(this._identifier(b),_)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,_){return this._oscParser.registerHandler(b,_)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(b,_,x,k,N){this._parseStack.state=b,this._parseStack.handlers=_,this._parseStack.handlerPos=x,this._parseStack.transition=k,this._parseStack.chunkPos=N}parse(b,_,x){let k,N=0,A=0,M=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,M=this._parseStack.chunkPos+1;else{if(x===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const R=this._parseStack.handlers;let j=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(x===!1&&j>-1){for(;j>=0&&(k=R[j](this._params),k!==!0);j--)if(k instanceof Promise)return this._parseStack.handlerPos=j,k}this._parseStack.handlers=[];break;case 4:if(x===!1&&j>-1){for(;j>=0&&(k=R[j](),k!==!0);j--)if(k instanceof Promise)return this._parseStack.handlerPos=j,k}this._parseStack.handlers=[];break;case 6:if(N=b[this._parseStack.chunkPos],k=this._dcsParser.unhook(N!==24&&N!==26,x),k)return k;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=b[this._parseStack.chunkPos],k=this._oscParser.end(N!==24&&N!==26,x),k)return k;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,M=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let R=M;R<_;++R){switch(N=b[R],A=this._transitions.table[this.currentState<<8|(N<160?N:C)],A>>4){case 2:for(let $=R+1;;++$){if($>=_||(N=b[$])<32||N>126&&N<C){this._printHandler(b,R,$),R=$-1;break}if(++$>=_||(N=b[$])<32||N>126&&N<C){this._printHandler(b,R,$),R=$-1;break}if(++$>=_||(N=b[$])<32||N>126&&N<C){this._printHandler(b,R,$),R=$-1;break}if(++$>=_||(N=b[$])<32||N>126&&N<C){this._printHandler(b,R,$),R=$-1;break}}break;case 3:this._executeHandlers[N]?this._executeHandlers[N]():this._executeHandlerFb(N),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:R,code:N,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const j=this._csiHandlers[this._collect<<8|N];let O=j?j.length-1:-1;for(;O>=0&&(k=j[O](this._params),k!==!0);O--)if(k instanceof Promise)return this._preserveStack(3,j,O,A,R),k;O<0&&this._csiHandlerFb(this._collect<<8|N,this._params),this.precedingJoinState=0;break;case 8:do switch(N){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(N-48)}while(++R<_&&(N=b[R])>47&&N<60);R--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const B=this._escHandlers[this._collect<<8|N];let q=B?B.length-1:-1;for(;q>=0&&(k=B[q](),k!==!0);q--)if(k instanceof Promise)return this._preserveStack(4,B,q,A,R),k;q<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let $=R+1;;++$)if($>=_||(N=b[$])===24||N===26||N===27||N>127&&N<C){this._dcsParser.put(b,R,$),R=$-1;break}break;case 14:if(k=this._dcsParser.unhook(N!==24&&N!==26),k)return this._preserveStack(6,[],0,A,R),k;N===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let $=R+1;;$++)if($>=_||(N=b[$])<32||N>127&&N<C){this._oscParser.put(b,R,$),R=$-1;break}break;case 6:if(k=this._oscParser.end(N!==24&&N!==26),k)return this._preserveStack(5,[],0,A,R),k;N===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&A}}}a.EscapeSequenceParser=w},6242:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const f=d(5770),p=d(482),h=[];a.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(y,S){this._handlers[y]===void 0&&(this._handlers[y]=[]);const C=this._handlers[y];return C.push(S),{dispose:()=>{const w=C.indexOf(S);w!==-1&&C.splice(w,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].start();else this._handlerFb(this._id,"START")}_put(y,S,C){if(this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].put(y,S,C);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(y,S,C))}start(){this.reset(),this._state=1}put(y,S,C){if(this._state!==3){if(this._state===1)for(;S<C;){const w=y[S++];if(w===59){this._state=2,this._start();break}if(w<48||57<w)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+w-48}this._state===2&&C-S>0&&this._put(y,S,C)}}end(y,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,w=this._active.length-1,v=!1;if(this._stack.paused&&(w=this._stack.loopPosition-1,C=S,v=this._stack.fallThrough,this._stack.paused=!1),!v&&C===!1){for(;w>=0&&(C=this._active[w].end(y),C!==!0);w--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!1,C;w--}for(;w>=0;w--)if(C=this._active[w].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",y);this._active=h,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(y){this._handler=y,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(y,S,C){this._hitLimit||(this._data+=(0,p.utf32ToString)(y,S,C),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(y){let S=!1;if(this._hitLimit)S=!1;else if(y&&(S=this._handler(this._data),S instanceof Promise))return S.then((C=>(this._data="",this._hitLimit=!1,C)));return this._data="",this._hitLimit=!1,S}}},8742:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const d=2147483647;class f{static fromArray(h){const y=new f;if(!h.length)return y;for(let S=Array.isArray(h[0])?1:0;S<h.length;++S){const C=h[S];if(Array.isArray(C))for(let w=0;w<C.length;++w)y.addSubParam(C[w]);else y.addParam(C)}return y}constructor(h=32,y=32){if(this.maxLength=h,this.maxSubParamsLength=y,y>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(y),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new f(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let y=0;y<this.length;++y){h.push(this.params[y]);const S=this._subParamsIdx[y]>>8,C=255&this._subParamsIdx[y];C-S>0&&h.push(Array.prototype.slice.call(this._subParams,S,C))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>d?d:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>d?d:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const y=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-y>0?this._subParams.subarray(y,S):null}getSubParamsAll(){const h={};for(let y=0;y<this.length;++y){const S=this._subParamsIdx[y]>>8,C=255&this._subParamsIdx[y];C-S>0&&(h[y]=this._subParams.slice(S,C))}return h}addDigit(h){let y;if(this._rejectDigits||!(y=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,C=S[y-1];S[y-1]=~C?Math.min(10*C+h,d):h}}a.Params=f},5741:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()}loadAddon(d,f){const p={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(p),f.dispose=()=>this._wrappedAddonDispose(p),f.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let f=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===d){f=p;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(f,1)}}},8771:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const f=d(3785),p=d(511);a.BufferApiView=class{constructor(h,y){this._buffer=h,this.type=y}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const y=this._buffer.lines.get(h);if(y)return new f.BufferLineApiView(y)}getNullCell(){return new p.CellData}}},3785:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const f=d(511);a.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,h){if(!(p<0||p>=this._line.length))return h?(this._line.loadCell(p,h),h):this._line.loadCell(p,new f.CellData)}translateToString(p,h,y){return this._line.translateToString(p,h,y)}}},8285:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const f=d(8771),p=d(8460),h=d(844);class y extends h.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=y},7975:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,f){return this._core.registerCsiHandler(d,(p=>f(p.toArray())))}addCsiHandler(d,f){return this.registerCsiHandler(d,f)}registerDcsHandler(d,f){return this._core.registerDcsHandler(d,((p,h)=>f(p,h.toArray())))}addDcsHandler(d,f){return this.registerDcsHandler(d,f)}registerEscHandler(d,f){return this._core.registerEscHandler(d,f)}addEscHandler(d,f){return this.registerEscHandler(d,f)}registerOscHandler(d,f){return this._core.registerOscHandler(d,f)}addOscHandler(d,f){return this.registerOscHandler(d,f)}}},7090:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(d){this._core=d}register(d){this._core.unicodeService.register(d)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(d){this._core.unicodeService.activeVersion=d}}},744:function(u,a,d){var f=this&&this.__decorate||function(v,b,_,x){var k,N=arguments.length,A=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,_):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,b,_,x);else for(var M=v.length-1;M>=0;M--)(k=v[M])&&(A=(N<3?k(A):N>3?k(b,_,A):k(b,_))||A);return N>3&&A&&Object.defineProperty(b,_,A),A},p=this&&this.__param||function(v,b){return function(_,x){b(_,x,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const h=d(8460),y=d(844),S=d(5295),C=d(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let w=a.BufferService=class extends y.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(v,this))}resize(v,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const _=this.buffer;let x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===v.fg&&x.getBg(0)===v.bg||(x=_.getBlankLine(v,b),this._cachedBlankLine=x),x.isWrapped=b;const k=_.ybase+_.scrollTop,N=_.ybase+_.scrollBottom;if(_.scrollTop===0){const A=_.lines.isFull;N===_.lines.length-1?A?_.lines.recycle().copyFrom(x):_.lines.push(x.clone()):_.lines.splice(N+1,0,x.clone()),A?this.isUserScrolling&&(_.ydisp=Math.max(_.ydisp-1,0)):(_.ybase++,this.isUserScrolling||_.ydisp++)}else{const A=N-k+1;_.lines.shiftElements(k+1,A-1,-1),_.lines.set(N,x.clone())}this.isUserScrolling||(_.ydisp=_.ybase),this._onScroll.fire(_.ydisp)}scrollLines(v,b,_){const x=this.buffer;if(v<0){if(x.ydisp===0)return;this.isUserScrolling=!0}else v+x.ydisp>=x.ybase&&(this.isUserScrolling=!1);const k=x.ydisp;x.ydisp=Math.max(Math.min(x.ydisp+v,x.ybase),0),k!==x.ydisp&&(b||this._onScroll.fire(x.ydisp))}};a.BufferService=w=f([p(0,C.IOptionsService)],w)},7994:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(d){this.glevel=d,this.charset=this._charsets[d]}setgCharset(d,f){this._charsets[d]=f,this.glevel===d&&(this.charset=f)}}},1753:function(u,a,d){var f=this&&this.__decorate||function(x,k,N,A){var M,R=arguments.length,j=R<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,N):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,k,N,A);else for(var O=x.length-1;O>=0;O--)(M=x[O])&&(j=(R<3?M(j):R>3?M(k,N,j):M(k,N))||j);return R>3&&j&&Object.defineProperty(k,N,j),j},p=this&&this.__param||function(x,k){return function(N,A){k(N,A,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const h=d(2585),y=d(8460),S=d(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:x=>x.button!==4&&x.action===1&&(x.ctrl=!1,x.alt=!1,x.shift=!1,!0)},VT200:{events:19,restrict:x=>x.action!==32},DRAG:{events:23,restrict:x=>x.action!==32||x.button!==3},ANY:{events:31,restrict:x=>!0}};function w(x,k){let N=(x.ctrl?16:0)|(x.shift?4:0)|(x.alt?8:0);return x.button===4?(N|=64,N|=x.action):(N|=3&x.button,4&x.button&&(N|=64),8&x.button&&(N|=128),x.action===32?N|=32:x.action!==0||k||(N|=3)),N}const v=String.fromCharCode,b={DEFAULT:x=>{const k=[w(x,!1)+32,x.col+32,x.row+32];return k[0]>255||k[1]>255||k[2]>255?"":`\x1B[M${v(k[0])}${v(k[1])}${v(k[2])}`},SGR:x=>{const k=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${w(x,!0)};${x.col};${x.row}${k}`},SGR_PIXELS:x=>{const k=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${w(x,!0)};${x.x};${x.y}${k}`}};let _=a.CoreMouseService=class extends S.Disposable{constructor(x,k){super(),this._bufferService=x,this._coreService=k,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new y.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const N of Object.keys(C))this.addProtocol(N,C[N]);for(const N of Object.keys(b))this.addEncoding(N,b[N]);this.reset()}addProtocol(x,k){this._protocols[x]=k}addEncoding(x,k){this._encodings[x]=k}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(x){if(!this._protocols[x])throw new Error(`unknown protocol "${x}"`);this._activeProtocol=x,this._onProtocolChange.fire(this._protocols[x].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(x){if(!this._encodings[x])throw new Error(`unknown encoding "${x}"`);this._activeEncoding=x}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(x){if(x.col<0||x.col>=this._bufferService.cols||x.row<0||x.row>=this._bufferService.rows||x.button===4&&x.action===32||x.button===3&&x.action!==32||x.button!==4&&(x.action===2||x.action===3)||(x.col++,x.row++,x.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,x,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(x))return!1;const k=this._encodings[this._activeEncoding](x);return k&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(k):this._coreService.triggerDataEvent(k,!0)),this._lastEvent=x,!0}explainEvents(x){return{down:!!(1&x),up:!!(2&x),drag:!!(4&x),move:!!(8&x),wheel:!!(16&x)}}_equalEvents(x,k,N){if(N){if(x.x!==k.x||x.y!==k.y)return!1}else if(x.col!==k.col||x.row!==k.row)return!1;return x.button===k.button&&x.action===k.action&&x.ctrl===k.ctrl&&x.alt===k.alt&&x.shift===k.shift}};a.CoreMouseService=_=f([p(0,h.IBufferService),p(1,h.ICoreService)],_)},6975:function(u,a,d){var f=this&&this.__decorate||function(_,x,k,N){var A,M=arguments.length,R=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,k):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,x,k,N);else for(var j=_.length-1;j>=0;j--)(A=_[j])&&(R=(M<3?A(R):M>3?A(x,k,R):A(x,k))||R);return M>3&&R&&Object.defineProperty(x,k,R),R},p=this&&this.__param||function(_,x){return function(k,N){x(k,N,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const h=d(1439),y=d(8460),S=d(844),C=d(2585),w=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=a.CoreService=class extends S.Disposable{constructor(_,x,k){super(),this._bufferService=_,this._logService=x,this._optionsService=k,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new y.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new y.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(w),this.decPrivateModes=(0,h.clone)(v)}reset(){this.modes=(0,h.clone)(w),this.decPrivateModes=(0,h.clone)(v)}triggerDataEvent(_,x=!1){if(this._optionsService.rawOptions.disableStdin)return;const k=this._bufferService.buffer;x&&this._optionsService.rawOptions.scrollOnUserInput&&k.ybase!==k.ydisp&&this._onRequestScrollToBottom.fire(),x&&this._onUserInput.fire(),this._logService.debug(`sending data "${_}"`,(()=>_.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(_)}triggerBinaryEvent(_){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${_}"`,(()=>_.split("").map((x=>x.charCodeAt(0))))),this._onBinary.fire(_))}};a.CoreService=b=f([p(0,C.IBufferService),p(1,C.ILogService),p(2,C.IOptionsService)],b)},9074:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const f=d(8055),p=d(8460),h=d(844),y=d(6106);let S=0,C=0;class w extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new y.SortedList((_=>_==null?void 0:_.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(_){if(_.marker.isDisposed)return;const x=new v(_);if(x){const k=x.marker.onDispose((()=>x.dispose()));x.onDispose((()=>{x&&(this._decorations.delete(x)&&this._onDecorationRemoved.fire(x),k.dispose())})),this._decorations.insert(x),this._onDecorationRegistered.fire(x)}return x}reset(){for(const _ of this._decorations.values())_.dispose();this._decorations.clear()}*getDecorationsAtCell(_,x,k){var M,R,j;let N=0,A=0;for(const O of this._decorations.getKeyIterator(x))N=(M=O.options.x)!=null?M:0,A=N+((R=O.options.width)!=null?R:1),_>=N&&_<A&&(!k||((j=O.options.layer)!=null?j:"bottom")===k)&&(yield O)}forEachDecorationAtCell(_,x,k,N){this._decorations.forEachByKey(x,(A=>{var M,R,j;S=(M=A.options.x)!=null?M:0,C=S+((R=A.options.width)!=null?R:1),_>=S&&_<C&&(!k||((j=A.options.layer)!=null?j:"bottom")===k)&&N(A)}))}}a.DecorationService=w;class v extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(_){super(),this.options=_,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=_.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const f=d(2585),p=d(8343);class h{constructor(...S){this._entries=new Map;for(const[C,w]of S)this.set(C,w)}set(S,C){const w=this._entries.get(S);return this._entries.set(S,C),w}forEach(S){for(const[C,w]of this._entries.entries())S(C,w)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}a.ServiceCollection=h,a.InstantiationService=class{constructor(){this._services=new h,this._services.set(f.IInstantiationService,this)}setService(y,S){this._services.set(y,S)}getService(y){return this._services.get(y)}createInstance(y,...S){const C=(0,p.getServiceDependencies)(y).sort(((b,_)=>b.index-_.index)),w=[];for(const b of C){const _=this._services.get(b.id);if(!_)throw new Error(`[createInstance] ${y.name} depends on UNKNOWN service ${b.id}.`);w.push(_)}const v=C.length>0?C[0].index:S.length;if(S.length!==v)throw new Error(`[createInstance] First service dependency of ${y.name} at position ${v+1} conflicts with ${S.length} static arguments`);return new y(...S,...w)}}},7866:function(u,a,d){var f=this&&this.__decorate||function(v,b,_,x){var k,N=arguments.length,A=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,_):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,b,_,x);else for(var M=v.length-1;M>=0;M--)(k=v[M])&&(A=(N<3?k(A):N>3?k(b,_,A):k(b,_))||A);return N>3&&A&&Object.defineProperty(b,_,A),A},p=this&&this.__param||function(v,b){return function(_,x){b(_,x,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=d(844),y=d(2585),S={trace:y.LogLevelEnum.TRACE,debug:y.LogLevelEnum.DEBUG,info:y.LogLevelEnum.INFO,warn:y.LogLevelEnum.WARN,error:y.LogLevelEnum.ERROR,off:y.LogLevelEnum.OFF};let C,w=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=y.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let b=0;b<v.length;b++)typeof v[b]=="function"&&(v[b]=v[b]())}_log(v,b,_){this._evalLazyOptionalParams(_),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+b,..._)}trace(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.TRACE&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.trace.bind(this._optionsService.options.logger))!=null?x:console.log,v,b)}debug(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.DEBUG&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.debug.bind(this._optionsService.options.logger))!=null?x:console.log,v,b)}info(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.INFO&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.info.bind(this._optionsService.options.logger))!=null?x:console.info,v,b)}warn(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.WARN&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.warn.bind(this._optionsService.options.logger))!=null?x:console.warn,v,b)}error(v,...b){var _,x;this._logLevel<=y.LogLevelEnum.ERROR&&this._log((x=(_=this._optionsService.options.logger)==null?void 0:_.error.bind(this._optionsService.options.logger))!=null?x:console.error,v,b)}};a.LogService=w=f([p(0,y.IOptionsService)],w),a.setTraceLogger=function(v){C=v},a.traceCall=function(v,b,_){if(typeof _.value!="function")throw new Error("not supported");const x=_.value;_.value=function(...k){if(C.logLevel!==y.LogLevelEnum.TRACE)return x.apply(this,k);C.trace(`GlyphRenderer#${x.name}(${k.map((A=>JSON.stringify(A))).join(", ")})`);const N=x.apply(this,k);return C.trace(`GlyphRenderer#${x.name} return`,N),N}}},7302:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const f=d(8460),p=d(844),h=d(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const y=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends p.Disposable{constructor(w){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...a.DEFAULT_OPTIONS};for(const b in w)if(b in v)try{const _=w[b];v[b]=this._sanitizeAndValidateOption(b,_)}catch(_){console.error(_)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(w,v){return this.onOptionChange((b=>{b===w&&v(this.rawOptions[w])}))}onMultipleOptionChange(w,v){return this.onOptionChange((b=>{w.indexOf(b)!==-1&&v()}))}_setupOptions(){const w=b=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,_)=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);_=this._sanitizeAndValidateOption(b,_),this.rawOptions[b]!==_&&(this.rawOptions[b]=_,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const _={get:w.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,_)}}_sanitizeAndValidateOption(w,v){switch(w){case"cursorStyle":if(v||(v=a.DEFAULT_OPTIONS[w]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${w}`);break;case"wordSeparator":v||(v=a.DEFAULT_OPTIONS[w]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=y.includes(v)?v:a.DEFAULT_OPTIONS[w];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${w} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${w} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${w} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${w} must be numeric, value: ${v}`);break;case"windowsPty":v=v!=null?v:{}}return v}}a.OptionsService=S},2660:function(u,a,d){var f=this&&this.__decorate||function(S,C,w,v){var b,_=arguments.length,x=_<3?C:v===null?v=Object.getOwnPropertyDescriptor(C,w):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(S,C,w,v);else for(var k=S.length-1;k>=0;k--)(b=S[k])&&(x=(_<3?b(x):_>3?b(C,w,x):b(C,w))||x);return _>3&&x&&Object.defineProperty(C,w,x),x},p=this&&this.__param||function(S,C){return function(w,v){C(w,v,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const h=d(2585);let y=a.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const C=this._bufferService.buffer;if(S.id===void 0){const k=C.addMarker(C.ybase+C.y),N={data:S,id:this._nextId++,lines:[k]};return k.onDispose((()=>this._removeMarkerFromLink(N,k))),this._dataByLinkId.set(N.id,N),N.id}const w=S,v=this._getEntryIdKey(w),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,C.ybase+C.y),b.id;const _=C.addMarker(C.ybase+C.y),x={id:this._nextId++,key:this._getEntryIdKey(w),data:w,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(x,_))),this._entriesWithId.set(x.key,x),this._dataByLinkId.set(x.id,x),x.id}addLineToLink(S,C){const w=this._dataByLinkId.get(S);if(w&&w.lines.every((v=>v.line!==C))){const v=this._bufferService.buffer.addMarker(C);w.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(w,v)))}}getLinkData(S){var C;return(C=this._dataByLinkId.get(S))==null?void 0:C.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,C){const w=S.lines.indexOf(C);w!==-1&&(S.lines.splice(w,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};a.OscLinkService=y=f([p(0,h.IBufferService)],y)},8343:(u,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(p){return p[f]||[]},a.createDecorator=function(p){if(a.serviceRegistry.has(p))return a.serviceRegistry.get(p);const h=function(y,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(w,v,b){v[d]===v?v[f].push({id:w,index:b}):(v[f]=[{id:w,index:b}],v[d]=v)})(h,y,C)};return h.toString=()=>p,a.serviceRegistry.set(p,h),h}},2585:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=d(8343);var p;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(p||(a.LogLevelEnum=p={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(u,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const f=d(8460),p=d(225);class h{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,C,w=!1){return(16777215&S)<<3|(3&C)<<1|(w?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const S=new p.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let C=0,w=0;const v=S.length;for(let b=0;b<v;++b){let _=S.charCodeAt(b);if(55296<=_&&_<=56319){if(++b>=v)return C+this.wcwidth(_);const N=S.charCodeAt(b);56320<=N&&N<=57343?_=1024*(_-55296)+N-56320+65536:C+=this.wcwidth(N)}const x=this.charProperties(_,w);let k=h.extractWidth(x);h.extractShouldJoin(x)&&(k-=h.extractWidth(w)),C+=k,w=x}return C}charProperties(S,C){return this._activeProvider.charProperties(S,C)}}a.UnicodeService=h}},i={};function o(u){var a=i[u];if(a!==void 0)return a.exports;var d=i[u]={exports:{}};return n[u].call(d.exports,d,d.exports,o),d.exports}var l={};return(()=>{var u=l;Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const a=o(9042),d=o(3236),f=o(844),p=o(5741),h=o(8285),y=o(7975),S=o(7090),C=["cols","rows"];class w extends f.Disposable{constructor(b){super(),this._core=this.register(new d.Terminal(b)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const _=k=>this._core.options[k],x=(k,N)=>{this._checkReadonlyOptions(k),this._core.options[k]=N};for(const k in this._core.options){const N={get:_.bind(this,k),set:x.bind(this,k)};Object.defineProperty(this._publicOptions,k,N)}}_checkReadonlyOptions(b){if(C.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new y.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let _="none";switch(this._core.coreMouseService.activeProtocol){case"X10":_="x10";break;case"VT200":_="vt200";break;case"DRAG":_="drag";break;case"ANY":_="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:_,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const _ in b)this._publicOptions[_]=b[_]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,_=!0){this._core.input(b,_)}resize(b,_){this._verifyIntegers(b,_),this._core.resize(b,_)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){var _,x,k;return this._checkProposedApi(),this._verifyPositiveIntegers((_=b.x)!=null?_:0,(x=b.width)!=null?x:0,(k=b.height)!=null?k:0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,_,x){this._verifyIntegers(b,_,x),this._core.select(b,_,x)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,_){this._verifyIntegers(b,_),this._core.selectLines(b,_)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,_){this._core.write(b,_)}writeln(b,_){this._core.write(b),this._core.write(`\r
|
|
514
|
+
`,_)}paste(b){this._core.paste(b)}refresh(b,_){this._verifyIntegers(b,_),this._core.refresh(b,_)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return a}_verifyIntegers(...b){for(const _ of b)if(_===1/0||isNaN(_)||_%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const _ of b)if(_&&(_===1/0||isNaN(_)||_%1!=0||_<0))throw new Error("This API only accepts positive integers")}}u.Terminal=w})(),l})()))})(ng)),ng.exports}var Sj=xj(),rg={exports:{}},Db;function wj(){return Db||(Db=1,(function(t,e){(function(n,i){t.exports=i()})(self,(()=>(()=>{var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(o){this._terminal=o}dispose(){}fit(){const o=this.proposeDimensions();if(!o||!this._terminal||isNaN(o.cols)||isNaN(o.rows))return;const l=this._terminal._core;this._terminal.rows===o.rows&&this._terminal.cols===o.cols||(l._renderService.clear(),this._terminal.resize(o.cols,o.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const o=this._terminal._core,l=o._renderService.dimensions;if(l.css.cell.width===0||l.css.cell.height===0)return;const u=this._terminal.options.scrollback===0?0:o.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(a.getPropertyValue("height")),f=Math.max(0,parseInt(a.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),h=d-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),y=f-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-u;return{cols:Math.max(2,Math.floor(y/l.css.cell.width)),rows:Math.max(1,Math.floor(h/l.css.cell.height))}}}})(),n})()))})(rg)),rg.exports}var Cj=wj(),ig={exports:{}},Mb;function kj(){return Mb||(Mb=1,(function(t,e){(function(n,i){t.exports=i()})(self,(()=>(()=>{var n={6:(u,a)=>{function d(p){try{const h=new URL(p),y=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return p.toLocaleLowerCase().startsWith(y.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(p,h,y,S={}){this._terminal=p,this._regex=h,this._handler=y,this._options=S}provideLinks(p,h){const y=f.computeLink(p,this._regex,this._terminal,this._handler);h(this._addCallbacks(y))}_addCallbacks(p){return p.map((h=>(h.leave=this._options.leave,h.hover=(y,S)=>{if(this._options.hover){const{range:C}=h;this._options.hover(y,S,C)}},h)))}};class f{static computeLink(h,y,S,C){const w=new RegExp(y.source,(y.flags||"")+"g"),[v,b]=f._getWindowedLineStrings(h-1,S),_=v.join("");let x;const k=[];for(;x=w.exec(_);){const N=x[0];if(!d(N))continue;const[A,M]=f._mapStrIdx(S,b,0,x.index),[R,j]=f._mapStrIdx(S,A,M,N.length);if(A===-1||M===-1||R===-1||j===-1)continue;const O={start:{x:M+1,y:A+1},end:{x:j,y:R+1}};k.push({range:O,text:N,activate:C})}return k}static _getWindowedLineStrings(h,y){let S,C=h,w=h,v=0,b="";const _=[];if(S=y.buffer.active.getLine(h)){const x=S.translateToString(!0);if(S.isWrapped&&x[0]!==" "){for(v=0;(S=y.buffer.active.getLine(--C))&&v<2048&&(b=S.translateToString(!0),v+=b.length,_.push(b),S.isWrapped&&b.indexOf(" ")===-1););_.reverse()}for(_.push(x),v=0;(S=y.buffer.active.getLine(++w))&&S.isWrapped&&v<2048&&(b=S.translateToString(!0),v+=b.length,_.push(b),b.indexOf(" ")===-1););}return[_,C]}static _mapStrIdx(h,y,S,C){const w=h.buffer.active,v=w.getNullCell();let b=S;for(;C;){const _=w.getLine(y);if(!_)return[-1,-1];for(let x=b;x<_.length;++x){_.getCell(x,v);const k=v.getChars();if(v.getWidth()&&(C-=k.length||1,x===_.length-1&&k==="")){const N=w.getLine(y+1);N&&N.isWrapped&&(N.getCell(0,v),v.getWidth()===2&&(C+=1))}if(C<0)return[y,x]}y++,b=0}return[y,b]}}a.LinkComputer=f}},i={};function o(u){var a=i[u];if(a!==void 0)return a.exports;var d=i[u]={exports:{}};return n[u](d,d.exports,o),d.exports}var l={};return(()=>{var u=l;Object.defineProperty(u,"__esModule",{value:!0}),u.WebLinksAddon=void 0;const a=o(6),d=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function f(p,h){const y=window.open();if(y){try{y.opener=null}catch{}y.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}u.WebLinksAddon=class{constructor(p=f,h={}){this._handler=p,this._options=h}activate(p){this._terminal=p;const h=this._options,y=h.urlRegex||d;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,y,this._handler,h))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),l})()))})(ig)),ig.exports}var Ej=kj();const wo={INPUT:1,RESIZE:2,CLOSE:3,OUTPUT:4,EXIT:5,ERROR:6,INIT_ACK:7,TITLE:8};function sg(t,e){const n=new Uint8Array(1+e.length);return n[0]=t,n.set(e,1),n}function Aj(t,e){const{serverUrl:n,apiToken:i,cwd:o}=e,l=D.useRef(null),u=D.useRef(null),a=D.useRef(null),d=D.useRef("disconnected"),f=D.useRef(!1),p=D.useRef(0),h=D.useRef(e.onStatusChange),y=D.useRef(e.onExit),S=D.useRef(e.onSessionInit),C=D.useRef(e.onTitleChange);D.useEffect(()=>{h.current=e.onStatusChange,y.current=e.onExit,S.current=e.onSessionInit,C.current=e.onTitleChange});const w=D.useRef(n),v=D.useRef(i),b=D.useRef(o),_=D.useRef(e.serverSessionId);D.useEffect(()=>{w.current=n,v.current=i,b.current=o,_.current=e.serverSessionId});const x=D.useCallback(j=>{var O;d.current=j,(O=h.current)==null||O.call(h,j)},[]),k=D.useCallback(()=>{if(f.current)return;const j=++p.current,O=a.current;O&&(O.onopen=null,O.onclose=null,O.onmessage=null,O.onerror=null,O.close(),a.current=null),x("connecting");const B=_.current,q=B?`ws://${w.current}/ws/terminal?token=${v.current}&cwd=${encodeURIComponent(b.current)}&sessionId=${B}`:`ws://${w.current}/ws/terminal?token=${v.current}&cwd=${encodeURIComponent(b.current)}`,$=new WebSocket(q);$.binaryType="arraybuffer",$.onopen=()=>{if(p.current!==j){$.close();return}if(a.current=$,l.current&&u.current)try{u.current.fit()}catch{}},$.onmessage=V=>{var Q,I,L,z,H,F,J,ne;if(p.current!==j||!(V.data instanceof ArrayBuffer))return;const K=new Uint8Array(V.data);if(K.length<1)return;const G=K[0],Y=K.slice(1);switch(G){case wo.OUTPUT:{const Z=new TextDecoder().decode(Y);(Q=l.current)==null||Q.write(Z);break}case wo.EXIT:{const{exitCode:Z}=JSON.parse(new TextDecoder().decode(Y));x("exited"),(I=l.current)==null||I.writeln(`\r
|
|
515
|
+
[Process exited with code ${Z}]`),(L=y.current)==null||L.call(y,Z),$.close();break}case wo.ERROR:{const{message:Z}=JSON.parse(new TextDecoder().decode(Y));x("disconnected"),(z=l.current)==null||z.writeln(`\r
|
|
516
|
+
[Error: ${Z}]`);break}case wo.INIT_ACK:{const Z=JSON.parse(new TextDecoder().decode(Y));(H=S.current)==null||H.call(S,Z),Z.isReconnect&&Z.status==="exited"?(x("exited"),(F=l.current)==null||F.writeln(`\r
|
|
517
|
+
[Process exited with code ${Z.exitCode} while disconnected]`),(J=y.current)==null||J.call(y,Z.exitCode)):x("connected");break}case wo.TITLE:{const{title:Z}=JSON.parse(new TextDecoder().decode(Y));(ne=C.current)==null||ne.call(C,Z);break}}},$.onclose=()=>{var V;p.current===j&&(a.current=null,d.current==="connecting"?(x("disconnected"),(V=l.current)==null||V.writeln(`\r
|
|
518
|
+
[Connection failed]`)):d.current==="connected"&&x("disconnected"))},$.onerror=()=>{}},[x]);D.useEffect(()=>{const j=t();if(!j){console.log("[useTerminal] MAIN EFFECT: no container, returning early");return}N.current=!0,f.current=!1;const O=new Sj.Terminal({cursorBlink:!0,cursorStyle:"bar",fontSize:13,fontFamily:"'Menlo', 'Monaco', 'Courier New', monospace",scrollback:1e3,allowProposedApi:!0,theme:{background:"var(--background)",foreground:"var(--foreground)",cursor:"var(--foreground)",selectionBackground:"var(--accent)"}}),B=new Cj.FitAddon,q=new Ej.WebLinksAddon;O.loadAddon(B),O.loadAddon(q);let $=!1;const V=requestAnimationFrame(()=>{if(!($||!j.isConnected))if(O.open(j),O.cols<=1||O.rows<=1){const K=()=>{if(!$){try{if(B.fit(),O.cols>1&&O.rows>1)return}catch{}requestAnimationFrame(K)}};requestAnimationFrame(K)}else try{B.fit()}catch{}});return l.current=O,u.current=B,O.onData(K=>{const G=a.current;if(!G||G.readyState!==WebSocket.OPEN)return;const Y=new TextEncoder().encode(K);G.send(sg(wo.INPUT,Y))}),O.onResize(({cols:K,rows:G})=>{const Y=a.current;if(!Y||Y.readyState!==WebSocket.OPEN)return;const Q=new TextEncoder().encode(JSON.stringify({cols:K,rows:G}));Y.send(sg(wo.RESIZE,Q))}),k(),()=>{$=!0,cancelAnimationFrame(V),f.current=!0;const K=a.current;K&&(K.onopen=null,K.onclose=null,K.onmessage=null,K.onerror=null,K.close(),a.current=null),O.dispose(),l.current=null,u.current=null}},[t,k]);const N=D.useRef(!0);D.useEffect(()=>{if(N.current){N.current=!1;return}const j=a.current;j&&(j.close(),a.current=null),!f.current&&l.current&&k()},[n,i,o,k]);const A=D.useCallback(()=>{var j;try{(j=u.current)==null||j.fit()}catch{}},[]),M=D.useCallback(()=>{var j;(j=l.current)==null||j.focus()},[]),R=D.useCallback(()=>{var O;const j=a.current;if(j){try{j.send(sg(wo.CLOSE,new Uint8Array(0)))}catch{}j.close(),a.current=null}(O=l.current)==null||O.dispose(),l.current=null,u.current=null,f.current=!0},[]);return{fit:A,focus:M,destroy:R}}const Rj=D.forwardRef(function({serverUrl:e,apiToken:n,cwd:i,serverSessionId:o,onStatusChange:l,onExit:u,onSessionInit:a,onTitleChange:d},f){const p=D.useRef(null),h=D.useCallback(()=>p.current,[]),{fit:y,focus:S}=Aj(h,{serverUrl:e,apiToken:n,cwd:i,serverSessionId:o,onStatusChange:l,onExit:u,onSessionInit:a,onTitleChange:d});return D.useImperativeHandle(f,()=>({focus:S}),[S]),D.useEffect(()=>{const C=p.current;if(!C)return;const w=new ResizeObserver(()=>{requestAnimationFrame(()=>y())});return w.observe(C),()=>{w.disconnect()}},[y]),D.useEffect(()=>{const C=p.current;if(!C)return;let w=0;const v=10,b=setInterval(()=>{if(w++,w>v){clearInterval(b);return}C.offsetParent!==null&&(clearInterval(b),requestAnimationFrame(()=>y()))},100);return()=>{clearInterval(b)}},[y]),g.jsx("div",{ref:p,className:"w-full h-full",onFocus:S})});function Tj(){const t=ve.c(2),[e,n]=D.useState(Nj);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.visualViewport;if(!l)return;const u=()=>{n({height:l.height,offsetTop:l.offsetTop,scale:l.scale})};return u(),l.addEventListener("resize",u),l.addEventListener("scroll",u),()=>{l.removeEventListener("resize",u),l.removeEventListener("scroll",u)}},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),e}function Nj(){return{height:typeof window<"u"?window.innerHeight:0,offsetTop:0,scale:1}}const Dj=5,Mj=300,jj=200,Oj=.7,Lj=D.forwardRef(function({workspaceId:e,workspacePath:n,workspaceName:i,serverUrl:o,apiToken:l,isOpen:u,onClose:a},d){var F,J,ne;const f=cd(),p=Tj(),[h,y]=D.useState(new Map),[S,C]=D.useState(new Map),[w,v]=D.useState(Mj),b=D.useRef(!1),_=D.useRef(0),x=D.useRef(0),k=D.useRef(new Set),N=D.useRef(new Map),A=e?(F=h.get(e))!=null?F:[]:[],M=e?S.get(e):void 0,j=(e&&(ne=(J=h.get(e))==null?void 0:J.length)!=null?ne:0)<Dj,O=D.useCallback(async Z=>{if(!(!o||!l||k.current.has(Z))){k.current.add(Z);try{const W=await fetch(`http://${o}/api/workspaces/${Z}/terminals`,{headers:{Authorization:`Bearer ${l}`}});if(!W.ok)return;const U=await W.json();if(!U.sessions||U.sessions.length===0)return;const te=U.sessions.map(ie=>({id:crypto.randomUUID(),serverSessionId:ie.id,workspaceId:Z,workspacePath:ie.cwd,title:ie.title,status:"disconnected"}));y(ie=>{var De;const ae=(De=ie.get(Z))!=null?De:[],se=new Set(ae.map(Ke=>Ke.serverSessionId).filter(Boolean)),_e=te.filter(Ke=>!se.has(Ke.serverSessionId));if(_e.length===0)return ie;if(ae.length>0){for(const Ke of _e)fetch(`http://${o}/api/workspaces/${Z}/terminals/${Ke.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{});return ie}const Te=new Map(ie);return Te.set(Z,[...ae,..._e]),Te}),C(ie=>{const ae=new Map(ie);return ae.has(Z)||ae.set(Z,te[0].id),ae})}catch(W){console.log("[TerminalPanel] fetchExistingSessions FAILED",W)}finally{k.current.delete(Z)}}},[o,l]);D.useEffect(()=>{!e||!u||O(e)},[e,u,O]);const B=D.useCallback((Z,W)=>{y(U=>{const te=new Map(U);for(const[ie,ae]of te.entries()){const se=ae.map(_e=>_e.id===Z?{..._e,status:W}:_e);se.some(_e=>_e.id===Z)&&te.set(ie,se)}return te})},[]),q=D.useCallback((Z,W)=>{y(U=>{const te=new Map(U);for(const[ie,ae]of te.entries()){const se=ae.map(_e=>_e.id===Z?{..._e,serverSessionId:W.sessionId,title:W.title||_e.title}:_e);se.some(_e=>_e.id===Z)&&te.set(ie,se)}return te})},[]),$=D.useCallback((Z,W)=>{y(U=>{const te=new Map(U);for(const[ie,ae]of te.entries()){const se=ae.map(_e=>_e.id===Z?{..._e,title:W}:_e);se.some(_e=>_e.id===Z)&&te.set(ie,se)}return te})},[]),V=D.useCallback(()=>{if(!e||!n||!j)return;const Z={id:crypto.randomUUID(),serverSessionId:null,workspaceId:e,workspacePath:n,title:"main",status:"connecting"};y(W=>{var ie;const U=new Map(W),te=(ie=U.get(e))!=null?ie:[];return U.set(e,[...te,Z]),U}),C(W=>{const U=new Map(W);return U.set(e,Z.id),U})},[e,n,j]),K=D.useCallback(Z=>{const W=[...h.values()].flat().find(U=>U.id===Z);W!=null&&W.serverSessionId&&o&&l&&fetch(`http://${o}/api/workspaces/${W.workspaceId}/terminals/${W.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{}),y(U=>{const te=new Map(U);for(const[ie,ae]of te.entries()){const se=ae.filter(_e=>_e.id!==Z);se.length<ae.length&&te.set(ie,se)}return te}),C(U=>{var ie,ae;const te=new Map(U);for(const[se,_e]of te.entries())if(_e===Z){const Te=(ae=(ie=h.get(se))==null?void 0:ie.filter(De=>De.id!==Z))!=null?ae:[];Te.length>0?te.set(se,Te[Te.length-1].id):te.delete(se)}return te})},[h,o,l]);D.useEffect(()=>{var W;if(!e||!n||!u)return;((W=h.get(e))!=null?W:[]).length===0&&V()},[u,e,n,h,V]);const G=D.useCallback(()=>{var Z;(Z=N.current.get(M!=null?M:""))==null||Z.focus()},[M]);D.useImperativeHandle(d,()=>({focus:G}),[G]),D.useEffect(()=>{if(!u||A.length===0)return;const Z=setTimeout(G,300);return()=>clearTimeout(Z)},[u,A.length,G]);const Y=D.useCallback(Z=>{Z.preventDefault(),b.current=!0;const W="touches"in Z?Z.touches[0].clientY:Z.clientY;_.current=W,x.current=w;const U=ie=>{if(!b.current)return;const ae="touches"in ie?ie.touches[0].clientY:ie.clientY,se=_.current-ae,_e=window.innerHeight*Oj,Te=Math.min(Math.max(x.current+se,jj),_e);v(Te)},te=()=>{b.current=!1,document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",te),document.removeEventListener("touchmove",U),document.removeEventListener("touchend",te)};document.addEventListener("mousemove",U),document.addEventListener("mouseup",te),document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("touchend",te)},[w]);if(!e||!n||!o||!l)return g.jsx("div",{className:"flex items-center justify-center h-[300px] border-t border-border bg-background text-muted-foreground text-sm",children:"Select a workspace to use the terminal."});const I=`[${i||n.split("/").pop()||"ws"}]`,L=Z=>{switch(Z){case"connecting":return"bg-warning";case"connected":return"bg-success";case"disconnected":return"bg-muted-foreground";case"exited":return"bg-error"}},z=()=>g.jsxs("div",{className:"flex items-center gap-0.5 overflow-x-auto px-1 min-h-[32px]",children:[A.map(Z=>g.jsxs("div",{className:Ee("group flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer rounded-sm whitespace-nowrap border border-transparent",Z.id===M?"bg-accent text-accent-foreground border-border":"text-muted-foreground hover:bg-muted"),onClick:()=>C(W=>{const U=new Map(W);return U.set(e,Z.id),U}),children:[g.jsx("span",{className:Ee("w-1.5 h-1.5 rounded-full shrink-0",L(Z.status))}),g.jsxs("span",{children:[I," ",Z.title]}),g.jsx("button",{className:"opacity-0 group-hover:opacity-100 hover:text-destructive transition-opacity ml-0.5",onClick:W=>{W.stopPropagation(),K(Z.id)},children:g.jsx(Ns,{className:"w-3 h-3"})})]},Z.id)),j&&g.jsx(ze,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:V,title:"New terminal tab",children:g.jsx(oc,{className:"w-3.5 h-3.5"})})]}),H=()=>g.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:[A.map(Z=>g.jsx("div",{className:Ee("w-full h-full",Z.id!==M?"invisible absolute inset-0 pointer-events-none":"relative"),children:g.jsx(Ij,{tab:Z,serverUrl:o,apiToken:l,onStatusChange:W=>B(Z.id,W),onSessionInit:W=>q(Z.id,W),onTitleChange:W=>$(Z.id,W),onTerminalRef:W=>{W?N.current.set(Z.id,W):N.current.delete(Z.id)}},Z.id)},Z.id)),A.length===0&&g.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"No terminal sessions"})]});if(f){const W=p.height<window.innerHeight*.85?`calc(${p.height}px - env(safe-area-inset-top, 0px))`:Math.min(window.innerHeight*.7,p.height);return u?g.jsx(Ih,{open:u,onOpenChange:U=>!U&&a(),children:g.jsxs(Bh,{side:"top",className:"p-0 bg-background [&>button]:hidden flex flex-col",style:{height:W},children:[g.jsx(zh,{className:"sr-only",children:g.jsx(Ph,{children:"Terminal"})}),g.jsxs("div",{className:"flex items-center justify-between p-2 border-b border-border shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Iy,{className:"w-4 h-4"}),g.jsx("span",{className:"font-semibold text-sm",children:"Terminal"})]}),g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:a,children:g.jsx(Ns,{className:"w-4 h-4"})})]}),z(),H()]})}):null}return g.jsxs("div",{className:Ee(!u&&"hidden"),"data-terminal-panel":"",children:[g.jsx("div",{className:"w-full cursor-ns-resize flex items-center justify-center border-t border-border bg-background select-none shrink-0",style:{height:4},onMouseDown:Y,onTouchStart:Y,children:g.jsx("div",{className:"w-10 h-0.5 bg-muted-foreground/30 rounded-full"})}),g.jsxs("div",{className:"flex flex-col border-t border-border bg-background overflow-hidden shrink-0",style:{height:w},children:[g.jsxs("div",{className:"flex items-center justify-between px-2 py-1 border-b border-border shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Iy,{className:"w-3.5 h-3.5 text-muted-foreground"}),g.jsx("span",{className:"font-medium text-xs text-muted-foreground",children:"Terminal"})]}),g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:a,children:g.jsx(Ns,{className:"w-3.5 h-3.5"})})]}),z(),H()]})]})});function Ij(t){const e=ve.c(13),{tab:n,serverUrl:i,apiToken:o,onStatusChange:l,onSessionInit:u,onTitleChange:a,onTerminalRef:d}=t,f=D.useRef(l),p=D.useRef(u),h=D.useRef(a);let y;e[0]!==u||e[1]!==l||e[2]!==a?(y=()=>{f.current=l,p.current=u,h.current=a},e[0]=u,e[1]=l,e[2]=a,e[3]=y):y=e[3],D.useEffect(y);let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=k=>{f.current(k)},e[4]=S):S=e[4];const C=S;let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=k=>{p.current(k)},e[5]=w):w=e[5];const v=w;let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=k=>{h.current(k)},e[6]=b):b=e[6];const _=b;let x;return e[7]!==o||e[8]!==d||e[9]!==i||e[10]!==n.serverSessionId||e[11]!==n.workspacePath?(x=g.jsx(Rj,{ref:d,serverUrl:i,apiToken:o,cwd:n.workspacePath,serverSessionId:n.serverSessionId,onStatusChange:C,onSessionInit:v,onTitleChange:_}),e[7]=o,e[8]=d,e[9]=i,e[10]=n.serverSessionId,e[11]=n.workspacePath,e[12]=x):x=e[12],x}function Bj(t){return t.role==="assistant"}const zj=cc("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Df(t){const e=ve.c(10);let n,i,o;e[0]!==t?({className:n,variant:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n||e[5]!==o?(l=Ee(zj({variant:o}),n),e[4]=n,e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==i||e[8]!==l?(u=g.jsx("div",{"data-slot":"alert",role:"alert",className:l,...i}),e[7]=i,e[8]=l,e[9]=u):u=e[9],u}function Mf(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"alert-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Pj(t){const e=ve.c(12);let n,i,o;e[0]!==t?({className:n,value:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n?(l=Ee("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",n),e[4]=n,e[5]=l):l=e[5];const u=`translateX(-${100-(o||0)}%)`;let a;e[6]!==u?(a=g.jsx(LN,{"data-slot":"progress-indicator",className:"size-full flex-1 bg-primary transition-all",style:{transform:u}}),e[6]=u,e[7]=a):a=e[7];let d;return e[8]!==i||e[9]!==l||e[10]!==a?(d=g.jsx(ON,{"data-slot":"progress",className:l,...i,children:a}),e[8]=i,e[9]=l,e[10]=a,e[11]=d):d=e[11],d}function Sf(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(1)+"k":t.toString()}function Fj(t){return t>=60?"critical":t>=40?"warning":"normal"}function Hj(t){const e=ve.c(41),{totalTokens:n,contextWindow:i,modelName:o,compact:l}=t,u=n===void 0?0:n,a=i===void 0?0:i,d=l===void 0?!1:l,f=u===0?0:a;let p;e[0]!==f||e[1]!==u?(p=f===0?0:Math.min(100,Math.round(u/f*100)),e[0]=f,e[1]=u,e[2]=p):p=e[2];const h=p;let y;e[3]!==h?(y=Fj(h),e[3]=h,e[4]=y):y=e[4];const S=y;if(d){let O;e[5]!==u?(O=Sf(u),e[5]=u,e[6]=O):O=e[6];let B;e[7]!==f?(B=Sf(f),e[7]=f,e[8]=B):B=e[8];let q;e[9]!==O||e[10]!==B?(q=g.jsxs("span",{className:"text-xs font-mono",children:[O,"/",B]}),e[9]=O,e[10]=B,e[11]=q):q=e[11];let $;e[12]===Symbol.for("react.memo_cache_sentinel")?($=g.jsx(Uu,{asChild:!0,children:g.jsx(S4,{className:"size-3 text-muted-foreground cursor-help"})}),e[12]=$):$=e[12];let V;e[13]!==h?(V=g.jsx(Gf,{children:g.jsxs(Hu,{children:[$,g.jsx($u,{side:"bottom",children:g.jsxs("p",{className:"text-xs",children:[h,"% of context window used"]})})]})}),e[13]=h,e[14]=V):V=e[14];let K;return e[15]!==V||e[16]!==q?(K=g.jsxs("div",{className:"flex items-center gap-1.5",children:[q,V]}),e[15]=V,e[16]=q,e[17]=K):K=e[17],K}let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx("span",{className:"text-xs text-muted-foreground",children:"Tokens:"}),e[18]=C):C=e[18];let w;e[19]!==u?(w=Sf(u),e[19]=u,e[20]=w):w=e[20];let v;e[21]!==f?(v=Sf(f),e[21]=f,e[22]=v):v=e[22];let b;e[23]!==w||e[24]!==v?(b=g.jsxs("div",{className:"flex items-center gap-2",children:[C,g.jsxs("span",{className:"text-xs font-mono",children:[w,"/",v]})]}),e[23]=w,e[24]=v,e[25]=b):b=e[25];const _=S==="critical"&&"[&>div]:bg-destructive",x=S==="warning"&&"[&>div]:bg-warning",k=S==="normal"&&"[&>div]:bg-primary";let N;e[26]!==_||e[27]!==x||e[28]!==k?(N=Ee("h-1 w-20",_,x,k),e[26]=_,e[27]=x,e[28]=k,e[29]=N):N=e[29];let A;e[30]!==h||e[31]!==N?(A=g.jsx(Pj,{value:h,className:N}),e[30]=h,e[31]=N,e[32]=A):A=e[32];let M;e[33]!==h?(M=g.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["(",h,"%)"]}),e[33]=h,e[34]=M):M=e[34];let R;e[35]!==A||e[36]!==M?(R=g.jsxs("div",{className:"flex items-center gap-2",children:[A,M]}),e[35]=A,e[36]=M,e[37]=R):R=e[37];let j;return e[38]!==b||e[39]!==R?(j=g.jsx("div",{className:"flex items-center gap-3",children:g.jsxs("div",{className:"flex flex-col gap-1",children:[b,R]})}),e[38]=b,e[39]=R,e[40]=j):j=e[40],j}function Q1(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(vD,{"data-slot":"select",...n}),e[2]=n,e[3]=i):i=e[3],i}function Uj(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("scroll-my-1 p-1",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(CD,{"data-slot":"select-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function rc(t){const e=ve.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(yD,{"data-slot":"select-value",...n}),e[2]=n,e[3]=i):i=e[3],i}function Z1(t){const e=ve.c(13);let n,i,o,l;e[0]!==t?({className:i,size:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const u=l===void 0?"default":l;let a;e[5]!==i?(a=Ee("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=a):a=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(bD,{asChild:!0,children:g.jsx(sc,{className:"pointer-events-none size-4 text-muted-foreground"})}),e[7]=d):d=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==u||e[11]!==a?(f=g.jsxs(_D,{"data-slot":"select-trigger","data-size":u,className:a,...o,children:[n,d]}),e[8]=n,e[9]=o,e[10]=u,e[11]=a,e[12]=f):f=e[12],f}function J1(t){const e=ve.c(24);let n,i,o,l,u;e[0]!==t?({className:i,children:n,position:l,align:u,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=u):(n=e[1],i=e[2],o=e[3],l=e[4],u=e[5]);const a=l===void 0?"item-aligned":l,d=u===void 0?"center":u,f=a==="item-aligned",p=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==i||e[7]!==p?(h=Ee("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",p,i),e[6]=i,e[7]=p,e[8]=h):h=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(qj,{}),e[9]=y):y=e[9];const S=a==="popper"&&"";let C;e[10]!==S?(C=Ee("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",S),e[10]=S,e[11]=C):C=e[11];let w;e[12]!==n||e[13]!==a||e[14]!==C?(w=g.jsx(wD,{"data-position":a,className:C,children:n}),e[12]=n,e[13]=a,e[14]=C,e[15]=w):w=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx(Vj,{}),e[16]=v):v=e[16];let b;return e[17]!==d||e[18]!==a||e[19]!==o||e[20]!==f||e[21]!==h||e[22]!==w?(b=g.jsx(xD,{children:g.jsxs(SD,{"data-slot":"select-content","data-align-trigger":f,className:h,position:a,align:d,...o,children:[y,w,v]})}),e[17]=d,e[18]=a,e[19]=o,e[20]=f,e[21]=h,e[22]=w,e[23]=b):b=e[23],b}function $j(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("px-1.5 py-1 text-xs text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(kD,{"data-slot":"select-label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Fh(t){const e=ve.c(13);let n,i,o;e[0]!==t?({className:i,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==i?(l=Ee("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i),e[4]=i,e[5]=l):l=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:g.jsx(RD,{children:g.jsx(Ds,{className:"pointer-events-none"})})}),e[6]=u):u=e[6];let a;e[7]!==n?(a=g.jsx(AD,{children:n}),e[7]=n,e[8]=a):a=e[8];let d;return e[9]!==o||e[10]!==l||e[11]!==a?(d=g.jsxs(ED,{"data-slot":"select-item",className:l,...o,children:[u,a]}),e[9]=o,e[10]=l,e[11]=a,e[12]=d):d=e[12],d}function qj(t){const e=ve.c(9);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(GE,{}),e[5]=l):l=e[5];let u;return e[6]!==i||e[7]!==o?(u=g.jsx(TD,{"data-slot":"select-scroll-up-button",className:o,...i,children:l}),e[6]=i,e[7]=o,e[8]=u):u=e[8],u}function Vj(t){const e=ve.c(9);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(sc,{}),e[5]=l):l=e[5];let u;return e[6]!==i||e[7]!==o?(u=g.jsx(ND,{"data-slot":"select-scroll-down-button",className:o,...i,children:l}),e[6]=i,e[7]=o,e[8]=u):u=e[8],u}function ki(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(hN,{"data-slot":"label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Wj(t){switch(t){case"budget":return"$";case"standard":return"$$";case"premium":return"$$$";default:return""}}function Gj(t){const e=ve.c(45),{models:n,selectedModelId:i,onChangeModel:o,disabled:l,compact:u,iconOnly:a,connectedProviderIds:d,connectableProviderIds:f}=t,p=u===void 0?!1:u,h=a===void 0?!1:a;let y,S,C,w,v,b,_,x,k;if(e[0]!==p||e[1]!==f||e[2]!==d||e[3]!==l||e[4]!==h||e[5]!==n||e[6]!==o||e[7]!==i){const R=n.reduce(Kj,{});let j;e[17]!==n||e[18]!==o?(j=K=>{const G=n.find(Y=>Y.id===K);G&&o(K,G.providerId)},e[17]=n,e[18]=o,e[19]=j):j=e[19];const O=j,B=p&&!h;x="flex items-center gap-2",e[20]!==h||e[21]!==B?(k=!h&&g.jsx(ki,{className:"text-xs text-muted-foreground",children:B?g.jsx(jy,{className:"size-3.5"}):"Model:"}),e[20]=h,e[21]=B,e[22]=k):k=e[22],S=Q1,w=i||"",v=O,b=l;const q=h?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[180px] h-8 text-sm";let $;e[23]!==h?($=h&&g.jsxs(g.Fragment,{children:[g.jsx(jy,{className:"size-4"}),g.jsx(rc,{className:"sr-only"})]}),e[23]=h,e[24]=$):$=e[24];let V;e[25]!==h?(V=!h&&g.jsx(rc,{placeholder:"Select model"}),e[25]=h,e[26]=V):V=e[26],e[27]!==q||e[28]!==$||e[29]!==V?(_=g.jsxs(Z1,{className:q,children:[$,V]}),e[27]=q,e[28]=$,e[29]=V,e[30]=_):_=e[30],y=J1,C=Object.entries(R).map(K=>{const[G,Y]=K;return g.jsxs(Uj,{children:[g.jsx($j,{children:G}),Y.map(Q=>g.jsx(Fh,{value:Q.id,disabled:(f==null?void 0:f.has(Q.providerId))&&!(d!=null&&d.has(Q.providerId)),children:g.jsxs("span",{className:"flex items-center gap-2",children:[Q.name,g.jsx("span",{className:"text-muted-foreground text-xs",children:Wj(Q.tier)}),(f==null?void 0:f.has(Q.providerId))&&(d==null?void 0:d.has(Q.providerId))&&g.jsx(Kn,{variant:"secondary",className:"text-[10px] px-1 py-0 h-4",children:"Sub"}),(f==null?void 0:f.has(Q.providerId))&&!(d!=null&&d.has(Q.providerId))&&g.jsx(Kn,{variant:"outline",className:"text-[10px] px-1 py-0 h-4",children:"OAuth"})]})},Q.id))]},G)}),e[0]=p,e[1]=f,e[2]=d,e[3]=l,e[4]=h,e[5]=n,e[6]=o,e[7]=i,e[8]=y,e[9]=S,e[10]=C,e[11]=w,e[12]=v,e[13]=b,e[14]=_,e[15]=x,e[16]=k}else y=e[8],S=e[9],C=e[10],w=e[11],v=e[12],b=e[13],_=e[14],x=e[15],k=e[16];let N;e[31]!==y||e[32]!==C?(N=g.jsx(y,{children:C}),e[31]=y,e[32]=C,e[33]=N):N=e[33];let A;e[34]!==S||e[35]!==N||e[36]!==w||e[37]!==v||e[38]!==b||e[39]!==_?(A=g.jsxs(S,{value:w,onValueChange:v,disabled:b,children:[_,N]}),e[34]=S,e[35]=N,e[36]=w,e[37]=v,e[38]=b,e[39]=_,e[40]=A):A=e[40];let M;return e[41]!==A||e[42]!==x||e[43]!==k?(M=g.jsxs("div",{className:x,children:[k,A]}),e[41]=A,e[42]=x,e[43]=k,e[44]=M):M=e[44],M}function Kj(t,e){return t[e.providerName]||(t[e.providerName]=[]),t[e.providerName].push(e),t}const Yj={low:"Low",medium:"Medium",high:"High",xhigh:"X-High",minimal:"Minimal",max:"Max"};function Xj(t){return Yj[t]||t.charAt(0).toUpperCase()+t.slice(1)}function Qj(t){const e=ve.c(45),{variants:n,selectedVariant:i,onChangeVariant:o,disabled:l,compact:u,iconOnly:a}=t,d=u===void 0?!1:u,f=a===void 0?!1:a,p=d&&!f;if(!n||Object.keys(n).length===0)return null;let h,y,S,C,w,v,b,_,x,k;if(e[0]!==l||e[1]!==f||e[2]!==o||e[3]!==i||e[4]!==p||e[5]!==n){const R=Object.keys(n);let j;e[16]!==o?(j=V=>{o(V==="__none__"?null:V)},e[16]=o,e[17]=j):j=e[17];const O=j;k="flex items-center gap-2",e[18]!==f||e[19]!==p?(S=!f&&g.jsx(ki,{className:"text-xs text-muted-foreground",children:p?g.jsx(My,{className:"size-3.5"}):"Thinking:"}),e[18]=f,e[19]=p,e[20]=S):S=e[20],y=Q1,v=i||"__none__",b=O,_=l;const B=f?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[120px] h-8 text-sm";let q;e[21]!==f?(q=f&&g.jsxs(g.Fragment,{children:[g.jsx(My,{className:"size-4"}),g.jsx(rc,{className:"sr-only"})]}),e[21]=f,e[22]=q):q=e[22];let $;e[23]!==f?($=!f&&g.jsx(rc,{placeholder:"Default"}),e[23]=f,e[24]=$):$=e[24],e[25]!==B||e[26]!==q||e[27]!==$?(x=g.jsxs(Z1,{className:B,children:[q,$]}),e[25]=B,e[26]=q,e[27]=$,e[28]=x):x=e[28],h=J1,e[29]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(Fh,{value:"__none__",children:"Default"}),e[29]=C):C=e[29],w=R.map(Zj),e[0]=l,e[1]=f,e[2]=o,e[3]=i,e[4]=p,e[5]=n,e[6]=h,e[7]=y,e[8]=S,e[9]=C,e[10]=w,e[11]=v,e[12]=b,e[13]=_,e[14]=x,e[15]=k}else h=e[6],y=e[7],S=e[8],C=e[9],w=e[10],v=e[11],b=e[12],_=e[13],x=e[14],k=e[15];let N;e[30]!==h||e[31]!==C||e[32]!==w?(N=g.jsxs(h,{children:[C,w]}),e[30]=h,e[31]=C,e[32]=w,e[33]=N):N=e[33];let A;e[34]!==y||e[35]!==N||e[36]!==v||e[37]!==b||e[38]!==_||e[39]!==x?(A=g.jsxs(y,{value:v,onValueChange:b,disabled:_,children:[x,N]}),e[34]=y,e[35]=N,e[36]=v,e[37]=b,e[38]=_,e[39]=x,e[40]=A):A=e[40];let M;return e[41]!==S||e[42]!==A||e[43]!==k?(M=g.jsxs("div",{className:k,children:[S,A]}),e[41]=S,e[42]=A,e[43]=k,e[44]=M):M=e[44],M}function Zj(t){return g.jsx(Fh,{value:t,children:Xj(t)},t)}function Jj(t){const e=ve.c(24),{preconfigs:n,selectedPreconfigId:i,onChangePreconfig:o,disabled:l,compact:u,iconOnly:a}=t,d=u===void 0?!1:u,f=a===void 0?!1:a,p=d&&!f;let h;e[0]!==f||e[1]!==p?(h=!f&&g.jsx(ki,{className:"text-xs text-muted-foreground",children:p?g.jsx(i4,{className:"size-3.5"}):"Config:"}),e[0]=f,e[1]=p,e[2]=h):h=e[2];const y=i||"",S=f?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[140px] h-8 text-sm";let C;e[3]!==f?(C=f&&g.jsxs(g.Fragment,{children:[g.jsx(qx,{className:"size-4"}),g.jsx(rc,{className:"sr-only"})]}),e[3]=f,e[4]=C):C=e[4];let w;e[5]!==f?(w=!f&&g.jsx(rc,{placeholder:"Select config"}),e[5]=f,e[6]=w):w=e[6];let v;e[7]!==S||e[8]!==C||e[9]!==w?(v=g.jsxs(Z1,{className:S,children:[C,w]}),e[7]=S,e[8]=C,e[9]=w,e[10]=v):v=e[10];let b;e[11]!==n?(b=n.map(eO),e[11]=n,e[12]=b):b=e[12];let _;e[13]!==b?(_=g.jsx(J1,{children:b}),e[13]=b,e[14]=_):_=e[14];let x;e[15]!==l||e[16]!==o||e[17]!==_||e[18]!==y||e[19]!==v?(x=g.jsxs(Q1,{value:y,onValueChange:o,disabled:l,children:[v,_]}),e[15]=l,e[16]=o,e[17]=_,e[18]=y,e[19]=v,e[20]=x):x=e[20];let k;return e[21]!==x||e[22]!==h?(k=g.jsxs("div",{className:"flex items-center gap-2",children:[h,x]}),e[21]=x,e[22]=h,e[23]=k):k=e[23],k}function eO(t){return g.jsxs(Fh,{value:t.id,children:[t.name,t.isDefault&&g.jsx("span",{className:"ml-2 text-muted-foreground text-xs",children:"(default)"})]},t.id)}function tO(t){var je;const e=ve.c(104),{session:n,preconfigs:i,models:o,usage:l,modelName:u,onChangePreconfig:a,onChangeModel:d,onChangeVariant:f,onRename:p,onNavigateBack:h,isStreaming:y,onInterrupt:S,onCompact:C,isCompacting:w,canCompact:v,connectedProviderIds:b,connectableProviderIds:_,selectedVariant:x,variants:k}=t,[N,A]=D.useState(!1),[M,R]=D.useState(n.title||""),j=D.useRef(null),O=cd(),B=P8();let q,$;e[0]!==N?(q=()=>{N&&j.current&&(j.current.focus(),j.current.select())},$=[N],e[0]=N,e[1]=q,e[2]=$):(q=e[1],$=e[2]),D.useEffect(q,$);let V;e[3]!==n.title?(V=()=>{R(n.title||""),A(!0)},e[3]=n.title,e[4]=V):V=e[4];const K=V;let G;e[5]!==M||e[6]!==p||e[7]!==n.id||e[8]!==n.title?(G=()=>{const Ve=M.trim();Ve&&Ve!==n.title&&p(n.id,Ve),A(!1)},e[5]=M,e[6]=p,e[7]=n.id,e[8]=n.title,e[9]=G):G=e[9];const Y=G;let Q;e[10]!==Y||e[11]!==n.title?(Q=Ve=>{Ve.key==="Enter"?Y():Ve.key==="Escape"&&(R(n.title||""),A(!1))},e[10]=Y,e[11]=n.title,e[12]=Q):Q=e[12];const I=Q;let L;e[13]!==u||e[14]!==i||e[15]!==n.preconfigId||e[16]!==n.selectedModel?(L=n.selectedModel||((je=i.find(Ve=>Ve.id===n.preconfigId))==null?void 0:je.model)||u,e[13]=u,e[14]=i,e[15]=n.preconfigId,e[16]=n.selectedModel,e[17]=L):L=e[17];const z=L;let H;if(e[18]!==o||e[19]!==z){let Ve;e[21]!==z?(Ve=ct=>ct.id===z,e[21]=z,e[22]=Ve):Ve=e[22],H=o.find(Ve),e[18]=o,e[19]=z,e[20]=H}else H=e[20];const F=H,J=F==null?void 0:F.contextWindow;let ne;e[23]!==h||e[24]!==n.parentId?(ne=n.parentId&&h&&g.jsxs(ze,{variant:"ghost",size:"sm",onClick:h,className:"h-7",children:[g.jsx(IE,{className:"size-4","data-icon":"inline-start"}),"Back"]}),e[23]=h,e[24]=n.parentId,e[25]=ne):ne=e[25];let Z;e[26]!==M||e[27]!==I||e[28]!==K||e[29]!==Y||e[30]!==N||e[31]!==n.title?(Z=N?g.jsx("input",{ref:j,type:"text",value:M,onChange:Ve=>R(Ve.target.value),onBlur:Y,onKeyDown:I,className:"text-lg font-semibold bg-background border border-primary rounded px-2 py-0.5 outline-none min-w-0 flex-1",autoFocus:!0}):g.jsx("h2",{className:"text-lg font-semibold cursor-pointer px-2 py-0.5 -mx-2 rounded hover:bg-accent transition-colors truncate min-w-0",onDoubleClick:K,children:n.title||"Untitled Session"}),e[26]=M,e[27]=I,e[28]=K,e[29]=Y,e[30]=N,e[31]=n.title,e[32]=Z):Z=e[32];let W;e[33]!==n.id?(W=n.id.slice(0,8),e[33]=n.id,e[34]=W):W=e[34];let U;e[35]!==W?(U=g.jsx(Kn,{variant:"outline",className:"font-mono text-xs",children:W}),e[35]=W,e[36]=U):U=e[36];let te;e[37]!==n.status?(te=n.status==="closed"&&g.jsxs(Kn,{variant:"secondary",children:[g.jsx(OE,{className:"size-3","data-icon":"inline-start"}),"Archived"]}),e[37]=n.status,e[38]=te):te=e[38];let ie;e[39]!==U||e[40]!==te||e[41]!==ne||e[42]!==Z?(ie=g.jsx("div",{className:"flex items-center justify-start px-4 py-2 overflow-hidden",children:g.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[ne,Z,U,te]})}),e[39]=U,e[40]=te,e[41]=ne,e[42]=Z,e[43]=ie):ie=e[43];let ae;e[44]===Symbol.for("react.memo_cache_sentinel")?(ae=g.jsx(Eo,{}),e[44]=ae):ae=e[44];let se;e[45]!==J||e[46]!==O||e[47]!==u||e[48]!==l.completionTokens||e[49]!==l.promptTokens||e[50]!==l.totalTokens?(se=g.jsx(Hj,{promptTokens:l.promptTokens,completionTokens:l.completionTokens,totalTokens:l.totalTokens,contextWindow:J,modelName:u,compact:O}),e[45]=J,e[46]=O,e[47]=u,e[48]=l.completionTokens,e[49]=l.promptTokens,e[50]=l.totalTokens,e[51]=se):se=e[51];let _e;e[52]===Symbol.for("react.memo_cache_sentinel")?(_e=g.jsx(Eo,{orientation:"vertical",className:"hidden sm:block"}),e[52]=_e):_e=e[52];const Te=n.status==="closed"||!!n.parentId;let De;e[53]!==_||e[54]!==b||e[55]!==B||e[56]!==O||e[57]!==o||e[58]!==d||e[59]!==z||e[60]!==Te?(De=g.jsx(Gj,{models:o,selectedModelId:z,onChangeModel:d,disabled:Te,compact:B,iconOnly:O,connectedProviderIds:b,connectableProviderIds:_}),e[53]=_,e[54]=b,e[55]=B,e[56]=O,e[57]=o,e[58]=d,e[59]=z,e[60]=Te,e[61]=De):De=e[61];const Ke=n.status==="closed"||!!n.parentId;let Ae;e[62]!==B||e[63]!==O||e[64]!==f||e[65]!==x||e[66]!==Ke||e[67]!==k?(Ae=g.jsx(Qj,{variants:k,selectedVariant:x,onChangeVariant:f,disabled:Ke,compact:B,iconOnly:O}),e[62]=B,e[63]=O,e[64]=f,e[65]=x,e[66]=Ke,e[67]=k,e[68]=Ae):Ae=e[68];const rt=n.status==="closed"||!!n.parentId;let Je;e[69]!==B||e[70]!==O||e[71]!==a||e[72]!==i||e[73]!==n.preconfigId||e[74]!==rt?(Je=g.jsx(Jj,{preconfigs:i,selectedPreconfigId:n.preconfigId,onChangePreconfig:a,disabled:rt,compact:B,iconOnly:O}),e[69]=B,e[70]=O,e[71]=a,e[72]=i,e[73]=n.preconfigId,e[74]=rt,e[75]=Je):Je=e[75];let Qe;e[76]===Symbol.for("react.memo_cache_sentinel")?(Qe=g.jsx(Eo,{orientation:"vertical",className:"hidden sm:block"}),e[76]=Qe):Qe=e[76];let ot;e[77]!==v||e[78]!==B||e[79]!==w||e[80]!==y||e[81]!==C?(ot=C&&g.jsxs(g.Fragment,{children:[g.jsxs(ze,{variant:"outline",size:B?"icon":"sm",onClick:C,disabled:y||w||!v,title:w?"Compacting...":"Compact older messages",children:[g.jsx(Hx,{className:"size-4"}),!B&&g.jsx("span",{className:"ml-1",children:w?"Compacting...":"Compact"})]}),g.jsx(Eo,{orientation:"vertical",className:"hidden sm:block"})]}),e[77]=v,e[78]=B,e[79]=w,e[80]=y,e[81]=C,e[82]=ot):ot=e[82];const ue=y?"destructive":"outline",it=B?"icon":"sm",Ze=!S,dt=y?"":"opacity-60 hover:opacity-100",ce=y?"Interrupt operation":"Interrupt (no active operation)";let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=g.jsx(Wx,{className:"size-4"}),e[83]=xe):xe=e[83];let pe;e[84]!==B?(pe=!B&&g.jsx("span",{className:"ml-1",children:"Stop"}),e[84]=B,e[85]=pe):pe=e[85];let Me;e[86]!==S||e[87]!==ue||e[88]!==it||e[89]!==Ze||e[90]!==dt||e[91]!==ce||e[92]!==pe?(Me=g.jsxs(ze,{variant:ue,size:it,onClick:S,disabled:Ze,className:dt,title:ce,children:[xe,pe]}),e[86]=S,e[87]=ue,e[88]=it,e[89]=Ze,e[90]=dt,e[91]=ce,e[92]=pe,e[93]=Me):Me=e[93];let Le;e[94]!==se||e[95]!==De||e[96]!==Ae||e[97]!==Je||e[98]!==ot||e[99]!==Me?(Le=g.jsxs("div",{className:"inline-flex align-middle items-center gap-3 sm:gap-4 px-4 py-2 flex-wrap",children:[se,_e,De,Ae,Je,Qe,ot,Me]}),e[94]=se,e[95]=De,e[96]=Ae,e[97]=Je,e[98]=ot,e[99]=Me,e[100]=Le):Le=e[100];let nt;return e[101]!==ie||e[102]!==Le?(nt=g.jsxs("header",{className:"flex flex-col border-b border-border bg-card",children:[ie,ae,Le]}),e[101]=ie,e[102]=Le,e[103]=nt):nt=e[103],nt}function nO(t){const e=ve.c(46),{message:n,textContent:i,children:o,isQueued:l,onRemove:u,onRevert:a,canRevert:d,onFork:f,canFork:p}=t,h=l===void 0?!1:l,y=d===void 0?!1:d,S=p===void 0?!1:p,[C,w]=D.useState(!1),[v,b]=D.useState(!1),[_,x]=D.useState(!1),k=n.role==="user";let N;e[0]!==i?(N=async()=>{const F=i||"";await navigator.clipboard.writeText(F),w(!0),setTimeout(()=>w(!1),2e3)},e[0]=i,e[1]=N):N=e[1];const A=N,M=k?"items-end":"items-start";let R;e[2]!==M?(R=Ee("flex flex-col gap-1 mb-4 animate-slide-up min-w-0",M),e[2]=M,e[3]=R):R=e[3];const j=k?"mr-3":"ml-3";let O;e[4]!==j?(O=Ee("flex items-center gap-1.5 text-xs uppercase tracking-wide text-muted-foreground",j),e[4]=j,e[5]=O):O=e[5];let B;e[6]!==S||e[7]!==y||e[8]!==C||e[9]!==A||e[10]!==h||e[11]!==k||e[12]!==n.role||e[13]!==f||e[14]!==a?(B=k?g.jsxs(g.Fragment,{children:[!h&&g.jsxs(g.Fragment,{children:[y&&a&&g.jsx(ze,{variant:"ghost",size:"icon",onClick:()=>b(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Revert to this point",children:g.jsx(g5,{className:"size-3"})}),S&&f&&g.jsx(ze,{variant:"ghost",size:"icon",onClick:()=>x(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Fork from this point",children:g.jsx(b4,{className:"size-3"})}),g.jsx(ze,{variant:"ghost",size:"icon",onClick:A,className:"size-5 text-muted-foreground hover:text-foreground",children:C?g.jsx(Ds,{className:"size-3"}):g.jsx(Ou,{className:"size-3"})})]}),g.jsx(Gx,{className:"size-3"}),n.role]}):g.jsxs(g.Fragment,{children:[g.jsx(zE,{className:"size-3"}),n.role,g.jsx(ze,{variant:"ghost",size:"icon",onClick:A,className:"size-5 text-muted-foreground hover:text-foreground",children:C?g.jsx(Ds,{className:"size-3"}):g.jsx(Ou,{className:"size-3"})})]}),e[6]=S,e[7]=y,e[8]=C,e[9]=A,e[10]=h,e[11]=k,e[12]=n.role,e[13]=f,e[14]=a,e[15]=B):B=e[15];let q;e[16]!==O||e[17]!==B?(q=g.jsx("div",{className:O,children:B}),e[16]=O,e[17]=B,e[18]=q):q=e[18];const $=h?"bg-muted border-2 border-dashed border-muted-foreground/30 opacity-80":k?"bg-primary text-primary-foreground rounded-br-md":"bg-card text-card-foreground border border-border rounded-bl-md";let V;e[19]!==$?(V=Ee("rounded-2xl px-4 py-3 max-w-full relative group min-w-0 overflow-hidden",$),e[19]=$,e[20]=V):V=e[20];let K;e[21]!==h||e[22]!==u?(K=h&&g.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2 pb-2 border-b border-muted-foreground/20",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[g.jsx(Px,{className:"size-3 animate-pulse"}),g.jsx("span",{children:"Pending"})]}),u&&g.jsx(ze,{variant:"ghost",size:"icon",onClick:u,className:"size-6 text-muted-foreground hover:text-destructive hover:bg-destructive/10",title:"Remove from queue",children:g.jsx(Ns,{className:"size-3"})})]}),e[21]=h,e[22]=u,e[23]=K):K=e[23];let G;e[24]!==o?(G=g.jsx("div",{className:"min-w-0",children:o}),e[24]=o,e[25]=G):G=e[25];let Y;e[26]!==V||e[27]!==K||e[28]!==G?(Y=g.jsxs("div",{className:V,children:[K,G]}),e[26]=V,e[27]=K,e[28]=G,e[29]=Y):Y=e[29];let Q;e[30]!==a?(Q=()=>{a==null||a()},e[30]=a,e[31]=Q):Q=e[31];let I;e[32]!==v||e[33]!==Q?(I=g.jsx($g,{open:v,onOpenChange:b,title:"Revert Conversation",description:"This will delete this message and all messages after it. Are you sure you want to continue?",confirmLabel:"Revert",cancelLabel:"Cancel",onConfirm:Q,variant:"destructive"}),e[32]=v,e[33]=Q,e[34]=I):I=e[34];let L;e[35]!==f?(L=()=>{f==null||f()},e[35]=f,e[36]=L):L=e[36];let z;e[37]!==_||e[38]!==L?(z=g.jsx($g,{open:_,onOpenChange:x,title:"Fork Conversation",description:"This will create a new session with messages up to and including this point. The original session will be unchanged.",confirmLabel:"Fork",cancelLabel:"Cancel",onConfirm:L}),e[37]=_,e[38]=L,e[39]=z):z=e[39];let H;return e[40]!==q||e[41]!==Y||e[42]!==I||e[43]!==z||e[44]!==R?(H=g.jsxs("div",{className:R,children:[q,Y,I,z]}),e[40]=q,e[41]=Y,e[42]=I,e[43]=z,e[44]=R,e[45]=H):H=e[45],H}var rO=Object.create,Hh=Object.defineProperty,iO=Object.defineProperties,sO=Object.getOwnPropertyDescriptor,oO=Object.getOwnPropertyDescriptors,FC=Object.getOwnPropertyNames,Qf=Object.getOwnPropertySymbols,aO=Object.getPrototypeOf,ev=Object.prototype.hasOwnProperty,HC=Object.prototype.propertyIsEnumerable,jb=(t,e,n)=>e in t?Hh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yi=(t,e)=>{for(var n in e||(e={}))ev.call(e,n)&&jb(t,n,e[n]);if(Qf)for(var n of Qf(e))HC.call(e,n)&&jb(t,n,e[n]);return t},Uh=(t,e)=>iO(t,oO(e)),UC=(t,e)=>{var n={};for(var i in t)ev.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Qf)for(var i of Qf(t))e.indexOf(i)<0&&HC.call(t,i)&&(n[i]=t[i]);return n},lO=(t,e)=>function(){return e||(0,t[FC(t)[0]])((e={exports:{}}).exports,e),e.exports},cO=(t,e)=>{for(var n in e)Hh(t,n,{get:e[n],enumerable:!0})},uO=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of FC(e))!ev.call(t,o)&&o!==n&&Hh(t,o,{get:()=>e[o],enumerable:!(i=sO(e,o))||i.enumerable});return t},dO=(t,e,n)=>(n=t!=null?rO(aO(t)):{},uO(!t||!t.__esModule?Hh(n,"default",{value:t,enumerable:!0}):n,t)),fO=lO({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(t,e){var n=(function(){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,l={},u={util:{encode:function C(w){return w instanceof a?new a(w.type,C(w.content),w.alias):Array.isArray(w)?w.map(C):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(C){return Object.prototype.toString.call(C).slice(8,-1)},objId:function(C){return C.__id||Object.defineProperty(C,"__id",{value:++o}),C.__id},clone:function C(w,v){v=v||{};var b,_;switch(u.util.type(w)){case"Object":if(_=u.util.objId(w),v[_])return v[_];b={},v[_]=b;for(var x in w)w.hasOwnProperty(x)&&(b[x]=C(w[x],v));return b;case"Array":return _=u.util.objId(w),v[_]?v[_]:(b=[],v[_]=b,w.forEach(function(k,N){b[N]=C(k,v)}),b);default:return w}},getLanguage:function(C){for(;C;){var w=i.exec(C.className);if(w)return w[1].toLowerCase();C=C.parentElement}return"none"},setLanguage:function(C,w){C.className=C.className.replace(RegExp(i,"gi"),""),C.classList.add("language-"+w)},isActive:function(C,w,v){for(var b="no-"+w;C;){var _=C.classList;if(_.contains(w))return!0;if(_.contains(b))return!1;C=C.parentElement}return!!v}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(C,w){var v=u.util.clone(u.languages[C]);for(var b in w)v[b]=w[b];return v},insertBefore:function(C,w,v,b){b=b||u.languages;var _=b[C],x={};for(var k in _)if(_.hasOwnProperty(k)){if(k==w)for(var N in v)v.hasOwnProperty(N)&&(x[N]=v[N]);v.hasOwnProperty(k)||(x[k]=_[k])}var A=b[C];return b[C]=x,u.languages.DFS(u.languages,function(M,R){R===A&&M!=C&&(this[M]=x)}),x},DFS:function C(w,v,b,_){_=_||{};var x=u.util.objId;for(var k in w)if(w.hasOwnProperty(k)){v.call(w,k,w[k],b||k);var N=w[k],A=u.util.type(N);A==="Object"&&!_[x(N)]?(_[x(N)]=!0,C(N,v,null,_)):A==="Array"&&!_[x(N)]&&(_[x(N)]=!0,C(N,v,k,_))}}},plugins:{},highlight:function(C,w,v){var b={code:C,grammar:w,language:v};if(u.hooks.run("before-tokenize",b),!b.grammar)throw new Error('The language "'+b.language+'" has no grammar.');return b.tokens=u.tokenize(b.code,b.grammar),u.hooks.run("after-tokenize",b),a.stringify(u.util.encode(b.tokens),b.language)},tokenize:function(C,w){var v=w.rest;if(v){for(var b in v)w[b]=v[b];delete w.rest}var _=new p;return h(_,_.head,C),f(C,_,w,_.head,0),S(_)},hooks:{all:{},add:function(C,w){var v=u.hooks.all;v[C]=v[C]||[],v[C].push(w)},run:function(C,w){var v=u.hooks.all[C];if(!(!v||!v.length))for(var b=0,_;_=v[b++];)_(w)}},Token:a};function a(C,w,v,b){this.type=C,this.content=w,this.alias=v,this.length=(b||"").length|0}a.stringify=function C(w,v){if(typeof w=="string")return w;if(Array.isArray(w)){var b="";return w.forEach(function(A){b+=C(A,v)}),b}var _={type:w.type,content:C(w.content,v),tag:"span",classes:["token",w.type],attributes:{},language:v},x=w.alias;x&&(Array.isArray(x)?Array.prototype.push.apply(_.classes,x):_.classes.push(x)),u.hooks.run("wrap",_);var k="";for(var N in _.attributes)k+=" "+N+'="'+(_.attributes[N]||"").replace(/"/g,""")+'"';return"<"+_.tag+' class="'+_.classes.join(" ")+'"'+k+">"+_.content+"</"+_.tag+">"};function d(C,w,v,b){C.lastIndex=w;var _=C.exec(v);if(_&&b&&_[1]){var x=_[1].length;_.index+=x,_[0]=_[0].slice(x)}return _}function f(C,w,v,b,_,x){for(var k in v)if(!(!v.hasOwnProperty(k)||!v[k])){var N=v[k];N=Array.isArray(N)?N:[N];for(var A=0;A<N.length;++A){if(x&&x.cause==k+","+A)return;var M=N[A],R=M.inside,j=!!M.lookbehind,O=!!M.greedy,B=M.alias;if(O&&!M.pattern.global){var q=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,q+"g")}for(var $=M.pattern||M,V=b.next,K=_;V!==w.tail&&!(x&&K>=x.reach);K+=V.value.length,V=V.next){var G=V.value;if(w.length>C.length)return;if(!(G instanceof a)){var Y=1,Q;if(O){if(Q=d($,K,C,j),!Q||Q.index>=C.length)break;var H=Q.index,I=Q.index+Q[0].length,L=K;for(L+=V.value.length;H>=L;)V=V.next,L+=V.value.length;if(L-=V.value.length,K=L,V.value instanceof a)continue;for(var z=V;z!==w.tail&&(L<I||typeof z.value=="string");z=z.next)Y++,L+=z.value.length;Y--,G=C.slice(K,L),Q.index-=K}else if(Q=d($,0,G,j),!Q)continue;var H=Q.index,F=Q[0],J=G.slice(0,H),ne=G.slice(H+F.length),Z=K+G.length;x&&Z>x.reach&&(x.reach=Z);var W=V.prev;J&&(W=h(w,W,J),K+=J.length),y(w,W,Y);var U=new a(k,R?u.tokenize(F,R):F,B,F);if(V=h(w,W,U),ne&&h(w,V,ne),Y>1){var te={cause:k+","+A,reach:Z};f(C,w,v,V.prev,K,te),x&&te.reach>x.reach&&(x.reach=te.reach)}}}}}}function p(){var C={value:null,prev:null,next:null},w={value:null,prev:C,next:null};C.next=w,this.head=C,this.tail=w,this.length=0}function h(C,w,v){var b=w.next,_={value:v,prev:w,next:b};return w.next=_,b.prev=_,C.length++,_}function y(C,w,v){for(var b=w.next,_=0;_<v&&b!==C.tail;_++)b=b.next;w.next=b,b.prev=w,C.length-=_}function S(C){for(var w=[],v=C.head.next;v!==C.tail;)w.push(v.value),v=v.next;return w}return u})();e.exports=n,n.default=n}}),Ce=dO(fO());Ce.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Ce.languages.markup.tag.inside["attr-value"].inside.entity=Ce.languages.markup.entity,Ce.languages.markup.doctype.inside["internal-subset"].inside=Ce.languages.markup,Ce.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))}),Object.defineProperty(Ce.languages.markup.tag,"addInlined",{value:function(t,i){var n={},n=(n["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Ce.languages[i]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),i=(n["language-"+i]={pattern:/[\s\S]+/,inside:Ce.languages[i]},{});i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:n},Ce.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Ce.languages.markup.tag,"addAttribute",{value:function(t,e){Ce.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Ce.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Ce.languages.html=Ce.languages.markup,Ce.languages.mathml=Ce.languages.markup,Ce.languages.svg=Ce.languages.markup,Ce.languages.xml=Ce.languages.extend("markup",{}),Ce.languages.ssml=Ce.languages.xml,Ce.languages.atom=Ce.languages.xml,Ce.languages.rss=Ce.languages.xml,(function(t){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,i="(?:[^\\\\-]|"+n.source+")",i=RegExp(i+"-"+i),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};t.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(Ce),Ce.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Ce.languages.javascript=Ce.languages.extend("clike",{"class-name":[Ce.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Ce.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Ce.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Ce.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Ce.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Ce.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Ce.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Ce.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Ce.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Ce.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Ce.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Ce.languages.markup&&(Ce.languages.markup.tag.addInlined("script","javascript"),Ce.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Ce.languages.js=Ce.languages.javascript,Ce.languages.actionscript=Ce.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),Ce.languages.actionscript["class-name"].alias="function",delete Ce.languages.actionscript.parameter,delete Ce.languages.actionscript["literal-property"],Ce.languages.markup&&Ce.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:Ce.languages.markup}}),(function(t){var e=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};t.languages.coffeescript=t.languages.extend("javascript",{comment:e,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),t.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:e,interpolation:n}}}),t.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:t.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),t.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete t.languages.coffeescript["template-string"],t.languages.coffee=t.languages.coffeescript})(Ce),(function(t){var e=t.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(e,"addSupport",{value:function(n,i){(n=typeof n=="string"?[n]:n).forEach(function(o){var l=function(h){h.inside||(h.inside={}),h.inside.rest=i},u="doc-comment";if(a=t.languages[o]){var a,d=a[u];if((d=d||(a=t.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[u])instanceof RegExp&&(d=a[u]={pattern:d}),Array.isArray(d))for(var f=0,p=d.length;f<p;f++)d[f]instanceof RegExp&&(d[f]={pattern:d[f]}),l(d[f]);else l(d)}})}}),e.addSupport(["java","javascript","php"],e)})(Ce),(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,e=(t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css,t.languages.markup);e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))})(Ce),(function(t){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,e=(t.languages.css.selector={pattern:t.languages.css.selector.pattern,lookbehind:!0,inside:e={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+e.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[e,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},t.languages.css.atrule.inside["selector-function-argument"].inside=e,t.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};t.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:e,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:e,number:n})})(Ce),(function(t){var e=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+n.source+"(?:[ ]+"+e.source+")?|"+e.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function u(a,d){d=(d||"").replace(/m/g,"")+"m";var f=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return a});return RegExp(f,d)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:u(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:u(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:u(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:u(l),lookbehind:!0,greedy:!0},number:{pattern:u(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(Ce),(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(f){return f=f.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+f+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),l=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,u=(t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+l+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+l+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(f){["url","bold","italic","strike","code-snippet"].forEach(function(p){f!==p&&(t.languages.markdown[f].inside.content.inside[p]=t.languages.markdown[p])})}),t.hooks.add("after-tokenize",function(f){f.language!=="markdown"&&f.language!=="md"||(function p(h){if(h&&typeof h!="string")for(var y=0,S=h.length;y<S;y++){var C,w=h[y];w.type!=="code"?p(w.content):(C=w.content[1],w=w.content[3],C&&w&&C.type==="code-language"&&w.type==="code-block"&&typeof C.content=="string"&&(C=C.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),C="language-"+(C=(/[a-z][\w-]*/i.exec(C)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,C]:w.alias.push(C):w.alias=[C]))}})(f.tokens)}),t.hooks.add("wrap",function(f){if(f.type==="code-block"){for(var p="",h=0,y=f.classes.length;h<y;h++){var S=f.classes[h],S=/language-(.+)/.exec(S);if(S){p=S[1];break}}var C,w=t.languages[p];w?f.content=t.highlight((function(v){return v=v.replace(u,""),v=v.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(b,_){var x;return(_=_.toLowerCase())[0]==="#"?(x=_[1]==="x"?parseInt(_.slice(2),16):Number(_.slice(1)),d(x)):a[_]||b})})(f.content),w,p):p&&p!=="none"&&t.plugins.autoloader&&(C="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),f.attributes.id=C,t.plugins.autoloader.loadLanguages(p,function(){var v=document.getElementById(C);v&&(v.innerHTML=t.highlight(v.textContent,t.languages[p],p))}))}}),RegExp(t.languages.markup.tag.pattern.source,"gi")),a={amp:"&",lt:"<",gt:">",quot:'"'},d=String.fromCodePoint||String.fromCharCode;t.languages.md=t.languages.markdown})(Ce),Ce.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Ce.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Ce.hooks.add("after-tokenize",function(t){if(t.language==="graphql")for(var e=t.tokens.filter(function(C){return typeof C!="string"&&C.type!=="comment"&&C.type!=="scalar"}),n=0;n<e.length;){var i=e[n++];if(i.type==="keyword"&&i.content==="mutation"){var o=[];if(h(["definition-mutation","punctuation"])&&p(1).content==="("){n+=2;var l=y(/^\($/,/^\)$/);if(l===-1)continue;for(;n<l;n++){var u=p(0);u.type==="variable"&&(S(u,"variable-input"),o.push(u.content))}n=l+1}if(h(["punctuation","property-query"])&&p(0).content==="{"&&(n++,S(p(0),"property-mutation"),0<o.length)){var a=y(/^\{$/,/^\}$/);if(a!==-1)for(var d=n;d<a;d++){var f=e[d];f.type==="variable"&&0<=o.indexOf(f.content)&&S(f,"variable-input")}}}}function p(C){return e[n+C]}function h(C,w){w=w||0;for(var v=0;v<C.length;v++){var b=p(v+w);if(!b||b.type!==C[v])return}return 1}function y(C,w){for(var v=1,b=n;b<e.length;b++){var _=e[b],x=_.content;if(_.type==="punctuation"&&typeof x=="string"){if(C.test(x))v++;else if(w.test(x)&&--v===0)return b}}return-1}function S(C,w){var v=C.alias;v?Array.isArray(v)||(C.alias=v=[v]):C.alias=v=[],v.push(w)}}),Ce.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(t){var e=t.languages.javascript["template-string"],n=e.pattern.source,i=e.inside.interpolation,o=i.inside["interpolation-punctuation"],l=i.pattern.source;function u(h,y){if(t.languages[h])return{pattern:RegExp("((?:"+y+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:h}}}}function a(h,y,S){return h={code:h,grammar:y,language:S},t.hooks.run("before-tokenize",h),h.tokens=t.tokenize(h.code,h.grammar),t.hooks.run("after-tokenize",h),h.tokens}function d(h,y,S){var v=t.tokenize(h,{interpolation:{pattern:RegExp(l),lookbehind:!0}}),C=0,w={},v=a(v.map(function(_){if(typeof _=="string")return _;for(var x,k,_=_.content;h.indexOf((k=C++,x="___"+S.toUpperCase()+"_"+k+"___"))!==-1;);return w[x]=_,x}).join(""),y,S),b=Object.keys(w);return C=0,(function _(x){for(var k=0;k<x.length;k++){if(C>=b.length)return;var N,A,M,R,j,O,B,q=x[k];typeof q=="string"||typeof q.content=="string"?(N=b[C],(B=(O=typeof q=="string"?q:q.content).indexOf(N))!==-1&&(++C,A=O.substring(0,B),j=w[N],M=void 0,(R={})["interpolation-punctuation"]=o,(R=t.tokenize(j,R)).length===3&&((M=[1,1]).push.apply(M,a(R[1],t.languages.javascript,"javascript")),R.splice.apply(R,M)),M=new t.Token("interpolation",R,i.alias,j),R=O.substring(B+N.length),j=[],A&&j.push(A),j.push(M),R&&(_(O=[R]),j.push.apply(j,O)),typeof q=="string"?(x.splice.apply(x,[k,1].concat(j)),k+=j.length-1):q.content=j)):(B=q.content,Array.isArray(B)?_(B):_([B]))}})(v),new t.Token(S,v,"language-"+S,h)}t.languages.javascript["template-string"]=[u("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),u("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),u("svg",/\bsvg/.source),u("markdown",/\b(?:markdown|md)/.source),u("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),u("sql",/\bsql/.source),e].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(h){return typeof h=="string"?h:Array.isArray(h)?h.map(p).join(""):p(h.content)}t.hooks.add("after-tokenize",function(h){h.language in f&&(function y(S){for(var C=0,w=S.length;C<w;C++){var v,b,_,x=S[C];typeof x!="string"&&(v=x.content,Array.isArray(v)?x.type==="template-string"?(x=v[1],v.length===3&&typeof x!="string"&&x.type==="embedded-code"&&(b=p(x),x=x.alias,x=Array.isArray(x)?x[0]:x,_=t.languages[x])&&(v[1]=d(b,_,x))):y(v):typeof v!="string"&&y([v]))}})(h.tokens)})})(Ce),(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Ce),(function(t){var e=t.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,i="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";t.languages.jsdoc=t.languages.extend("javadoclike",{parameter:{pattern:RegExp(i+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),t.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(i+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:e,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:e.string,number:e.number,boolean:e.boolean,keyword:t.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:e,alias:"language-javascript"}}}}),t.languages.javadoclike.addSupport("javascript",t.languages.jsdoc)})(Ce),(function(t){t.languages.flow=t.languages.extend("javascript",{}),t.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),t.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete t.languages.flow.parameter,t.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(t.languages.flow.keyword)||(t.languages.flow.keyword=[t.languages.flow.keyword]),t.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(Ce),Ce.languages.n4js=Ce.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),Ce.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),Ce.languages.n4jsd=Ce.languages.n4js,(function(t){function e(u,a){return RegExp(u.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),a)}t.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+t.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),t.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+t.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),t.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),t.languages.insertBefore("javascript","keyword",{imports:{pattern:e(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:t.languages.javascript},exports:{pattern:e(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:t.languages.javascript}}),t.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),t.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),t.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:e(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],i=0;i<n.length;i++){var l=n[i],o=t.languages.javascript[l],l=(o=t.util.type(o)==="RegExp"?t.languages.javascript[l]={pattern:o}:o).inside||{};(o.inside=l)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(Ce),(function(t){var e=t.util.clone(t.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function l(d,f){return d=d.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return o}),RegExp(d,f)}o=l(o).source,t.languages.jsx=t.languages.extend("markup",e),t.languages.jsx.tag.pattern=l(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=e.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:l(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:l(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);function u(d){for(var f=[],p=0;p<d.length;p++){var h=d[p],y=!1;typeof h!="string"&&(h.type==="tag"&&h.content[0]&&h.content[0].type==="tag"?h.content[0].content[0].content==="</"?0<f.length&&f[f.length-1].tagName===a(h.content[0].content[1])&&f.pop():h.content[h.content.length-1].content!=="/>"&&f.push({tagName:a(h.content[0].content[1]),openedBraces:0}):0<f.length&&h.type==="punctuation"&&h.content==="{"?f[f.length-1].openedBraces++:0<f.length&&0<f[f.length-1].openedBraces&&h.type==="punctuation"&&h.content==="}"?f[f.length-1].openedBraces--:y=!0),(y||typeof h=="string")&&0<f.length&&f[f.length-1].openedBraces===0&&(y=a(h),p<d.length-1&&(typeof d[p+1]=="string"||d[p+1].type==="plain-text")&&(y+=a(d[p+1]),d.splice(p+1,1)),0<p&&(typeof d[p-1]=="string"||d[p-1].type==="plain-text")&&(y=a(d[p-1])+y,d.splice(p-1,1),p--),d[p]=new t.Token("plain-text",y,null,y)),h.content&&typeof h.content!="string"&&u(h.content)}}var a=function(d){return d?typeof d=="string"?d:typeof d.content=="string"?d.content:d.content.map(a).join(""):""};t.hooks.add("after-tokenize",function(d){d.language!=="jsx"&&d.language!=="tsx"||u(d.tokens)})})(Ce),(function(t){var e=t.util.clone(t.languages.typescript),e=(t.languages.tsx=t.languages.extend("jsx",e),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"],t.languages.tsx.tag);e.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+e.pattern.source+")",e.pattern.flags),e.lookbehind=!0})(Ce),Ce.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Ce.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Ce.languages.swift}),(function(t){t.languages.kotlin=t.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete t.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:t.languages.kotlin}};t.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete t.languages.kotlin.string,t.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),t.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),t.languages.kt=t.languages.kotlin,t.languages.kts=t.languages.kotlin})(Ce),Ce.languages.c=Ce.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Ce.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Ce.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Ce.languages.c.string],char:Ce.languages.c.char,comment:Ce.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Ce.languages.c}}}}),Ce.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Ce.languages.c.boolean,Ce.languages.objectivec=Ce.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Ce.languages.objectivec["class-name"],Ce.languages.objc=Ce.languages.objectivec,Ce.languages.reason=Ce.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),Ce.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Ce.languages.reason.function,(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Ce),Ce.languages.go=Ce.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Ce.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Ce.languages.go["class-name"],(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Ce),Ce.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Ce.languages.python["string-interpolation"].inside.interpolation.inside.rest=Ce.languages.python,Ce.languages.py=Ce.languages.python,Ce.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Ce.languages.webmanifest=Ce.languages.json;var qu={};cO(qu,{dracula:()=>pO,duotoneDark:()=>gO,duotoneLight:()=>_O,github:()=>bO,gruvboxMaterialDark:()=>YO,gruvboxMaterialLight:()=>QO,jettwaveDark:()=>HO,jettwaveLight:()=>$O,nightOwl:()=>SO,nightOwlLight:()=>CO,oceanicNext:()=>EO,okaidia:()=>RO,oneDark:()=>VO,oneLight:()=>GO,palenight:()=>NO,shadesOfPurple:()=>MO,synthwave84:()=>OO,ultramin:()=>IO,vsDark:()=>$C,vsLight:()=>PO});var hO={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},pO=hO,mO={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},gO=mO,vO={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},_O=vO,yO={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},bO=yO,xO={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},SO=xO,wO={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},CO=wO,Or={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},kO={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Or.keyword}},{types:["attr-value"],style:{color:Or.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Or.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Or.primitive}},{types:["boolean"],style:{color:Or.boolean}},{types:["tag"],style:{color:Or.tag}},{types:["string"],style:{color:Or.string}},{types:["punctuation"],style:{color:Or.string}},{types:["selector","char","builtin","inserted"],style:{color:Or.char}},{types:["function"],style:{color:Or.function}},{types:["operator","entity","url","variable"],style:{color:Or.variable}},{types:["keyword"],style:{color:Or.keyword}},{types:["atrule","class-name"],style:{color:Or.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},EO=kO,AO={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},RO=AO,TO={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},NO=TO,DO={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},MO=DO,jO={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},OO=jO,LO={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},IO=LO,BO={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},$C=BO,zO={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},PO=zO,FO={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},HO=FO,UO={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},$O=UO,qO={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},VO=qO,WO={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},GO=WO,KO={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},YO=KO,XO={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},QO=XO,ZO=t=>D.useCallback(e=>{var n=e,{className:i,style:o,line:l}=n,u=UC(n,["className","style","line"]);const a=Uh(Yi({},u),{className:sh("token-line",i)});return typeof t=="object"&&"plain"in t&&(a.style=t.plain),typeof o=="object"&&(a.style=Yi(Yi({},a.style||{}),o)),a},[t]),JO=t=>{const e=D.useCallback(({types:n,empty:i})=>{if(t!=null){{if(n.length===1&&n[0]==="plain")return i!=null?{display:"inline-block"}:void 0;if(n.length===1&&i!=null)return t[n[0]]}return Object.assign(i!=null?{display:"inline-block"}:{},...n.map(o=>t[o]))}},[t]);return D.useCallback(n=>{var i=n,{token:o,className:l,style:u}=i,a=UC(i,["token","className","style"]);const d=Uh(Yi({},a),{className:sh("token",...o.types,l),children:o.content,style:e(o)});return u!=null&&(d.style=Yi(Yi({},d.style||{}),u)),d},[e])},e7=/\r\n|\r|\n/,Ob=t=>{t.length===0?t.push({types:["plain"],content:`
|
|
519
|
+
`,empty:!0}):t.length===1&&t[0].content===""&&(t[0].content=`
|
|
520
|
+
`,t[0].empty=!0)},Lb=(t,e)=>{const n=t.length;return n>0&&t[n-1]===e?t:t.concat(e)},t7=t=>{const e=[[]],n=[t],i=[0],o=[t.length];let l=0,u=0,a=[];const d=[a];for(;u>-1;){for(;(l=i[u]++)<o[u];){let f,p=e[u];const y=n[u][l];if(typeof y=="string"?(p=u>0?p:["plain"],f=y):(p=Lb(p,y.type),y.alias&&(p=Lb(p,y.alias)),f=y.content),typeof f!="string"){u++,e.push(p),n.push(f),i.push(0),o.push(f.length);continue}const S=f.split(e7),C=S.length;a.push({types:p,content:S[0]});for(let w=1;w<C;w++)Ob(a),d.push(a=[]),a.push({types:p,content:S[w]})}u--,e.pop(),n.pop(),i.pop(),o.pop()}return Ob(a),d},Ib=t7,n7=({prism:t,code:e,grammar:n,language:i})=>D.useMemo(()=>{if(n==null)return Ib([e]);const o={code:e,grammar:n,language:i,tokens:[]};return t.hooks.run("before-tokenize",o),o.tokens=t.tokenize(e,n),t.hooks.run("after-tokenize",o),Ib(o.tokens)},[e,n,i,t]),r7=(t,e)=>{const{plain:n}=t,i=t.styles.reduce((o,l)=>{const{languages:u,style:a}=l;return u&&!u.includes(e)||l.types.forEach(d=>{const f=Yi(Yi({},o[d]),a);o[d]=f}),o},{});return i.root=n,i.plain=Uh(Yi({},n),{backgroundColor:void 0}),i},i7=r7,s7=({children:t,language:e,code:n,theme:i,prism:o})=>{const l=e.toLowerCase(),u=i7(i,l),a=ZO(u),d=JO(u),f=o.languages[l],p=n7({prism:o,language:l,code:n,grammar:f});return t({tokens:p,className:`prism-code language-${l}`,style:u!=null?u.root:{},getLineProps:a,getTokenProps:d})},tv=t=>D.createElement(s7,Uh(Yi({},t),{prism:t.prism||Ce,theme:t.theme||$C,code:t.code,language:t.language}));/*! Bundled license information:
|
|
521
|
+
|
|
522
|
+
prismjs/prism.js:
|
|
523
|
+
(**
|
|
524
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
525
|
+
*
|
|
526
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
527
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
528
|
+
* @namespace
|
|
529
|
+
* @public
|
|
530
|
+
*)
|
|
531
|
+
*/function o7(t){var i;const e=(i=t.split(".").pop())==null?void 0:i.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",md:"markdown",css:"css",html:"html",py:"python",go:"go",rs:"rust",sh:"bash",yaml:"yaml",yml:"yaml"}[e||""]||e||"text"}const a7=D.memo(function(e){const n=ve.c(28),{type:i,content:o,lineNumber:l,newLineNumber:u,language:a}=e,d=i==="added"&&"bg-green-500/20",f=i==="removed"&&"bg-red-500/20",p=i==="context"&&"bg-muted/30";let h;n[0]!==d||n[1]!==f||n[2]!==p?(h=Ee("flex font-mono text-xs",d,f,p),n[0]=d,n[1]=f,n[2]=p,n[3]=h):h=n[3];const y=h,S=i==="added"&&"text-green-400",C=i==="removed"&&"text-red-400",w=i==="context"&&"text-muted-foreground/50";let v;n[4]!==S||n[5]!==C||n[6]!==w?(v=Ee("font-bold w-4 select-none",S,C,w),n[4]=S,n[5]=C,n[6]=w,n[7]=v):v=n[7];const b=v,_=l!=null?l:"";let x;n[8]!==_?(x=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:_}),n[8]=_,n[9]=x):x=n[9];const k=u!=null?u:"";let N;n[10]!==k?(N=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:k}),n[10]=k,n[11]=N):N=n[11];const A=i==="added"&&"+",M=i==="removed"&&"-",R=i==="context"&&" ";let j;n[12]!==b||n[13]!==A||n[14]!==M||n[15]!==R?(j=g.jsxs("span",{className:b,children:[A,M,R]}),n[12]=b,n[13]=A,n[14]=M,n[15]=R,n[16]=j):j=n[16];let O;n[17]!==o||n[18]!==a?(O=g.jsx(tv,{theme:qu.oneDark,code:o,language:a,children:l7}),n[17]=o,n[18]=a,n[19]=O):O=n[19];let B;n[20]!==j||n[21]!==O?(B=g.jsxs("span",{className:"pl-2 flex-1 whitespace-pre flex",children:[j,O]}),n[20]=j,n[21]=O,n[22]=B):B=n[22];let q;return n[23]!==x||n[24]!==N||n[25]!==B||n[26]!==y?(q=g.jsxs("div",{className:y,children:[x,N,B]}),n[23]=x,n[24]=N,n[25]=B,n[26]=y,n[27]=q):q=n[27],q}),qC=D.memo(function(e){const n=ve.c(27),{hunks:i,path:o,language:l,additions:u,deletions:a}=e,[d,f]=D.useState(!0);let p;n[0]!==o||n[1]!==l?(p=l||o7(o),n[0]=o,n[1]=l,n[2]=p):p=n[2];const h=p;let y;n[3]!==d?(y=()=>f(!d),n[3]=d,n[4]=y):y=n[4];let S;n[5]!==d?(S=d?g.jsx(sc,{className:"size-3"}):g.jsx(Ai,{className:"size-3"}),n[5]=d,n[6]=S):S=n[6];let C;n[7]!==y||n[8]!==S?(C=g.jsx("button",{onClick:y,className:"px-1 py-1 hover:bg-muted rounded",children:S}),n[7]=y,n[8]=S,n[9]=C):C=n[9];let w;n[10]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(s1,{className:"size-3"}),n[10]=w):w=n[10];let v;n[11]!==o?(v=g.jsx("span",{className:"font-mono pr-2",children:o}),n[11]=o,n[12]=v):v=n[12];let b;n[13]!==u||n[14]!==a?(b=u!==void 0&&a!==void 0&&g.jsxs("span",{className:"ml-auto mr-2 text-muted-foreground",children:["+",u," -",a]}),n[13]=u,n[14]=a,n[15]=b):b=n[15];let _;n[16]!==C||n[17]!==v||n[18]!==b?(_=g.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[C,w,v,b]}),n[16]=C,n[17]=v,n[18]=b,n[19]=_):_=n[19];let x;n[20]!==d||n[21]!==i||n[22]!==h?(x=d&&g.jsx("div",{style:{backgroundColor:"#282c34"},children:i.map((N,A)=>g.jsx("div",{className:"divide-y divide-white/5",children:N.changes.map((M,R)=>g.jsx(a7,{...M,language:h},R))},A))}),n[20]=d,n[21]=i,n[22]=h,n[23]=x):x=n[23];let k;return n[24]!==_||n[25]!==x?(k=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[_,x]})}),n[24]=_,n[25]=x,n[26]=k):k=n[26],k});function l7(t){const{tokens:e,getTokenProps:n}=t;return g.jsx(g.Fragment,{children:e.map((i,o)=>g.jsx("span",{children:i.map((l,u)=>g.jsx("span",{...n({token:l})},u))},o))})}const c7=20;function u7(t){var i;const e=(i=t.split(".").pop())==null?void 0:i.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",md:"markdown",css:"css",html:"html",py:"python",go:"go",rs:"rust",sh:"bash",yaml:"yaml",yml:"yaml"}[e||""]||e||"text"}const d7=D.memo(t=>{const e=ve.c(40),{content:n,path:i,language:o,created:l,highlightLines:u}=t;let a;e[0]!==u?(a=u===void 0?[]:u,e[0]=u,e[1]=a):a=e[1];const d=a,[f,p]=D.useState(!1);let h;e[2]!==o||e[3]!==i?(h=o||u7(i),e[2]=o,e[3]=i,e[4]=h):h=e[4];const y=h;let S;e[5]!==d?(S=new Set(d),e[5]=d,e[6]=S):S=e[6];const C=S;let w;e[7]!==n?(w=n.split(`
|
|
532
|
+
`),e[7]=n,e[8]=w):w=e[8];const v=w.length;let b;e[9]!==f?(b=()=>p(!f),e[9]=f,e[10]=b):b=e[10];let _;e[11]!==f?(_=f?g.jsx(sc,{className:"size-3"}):g.jsx(Ai,{className:"size-3"}),e[11]=f,e[12]=_):_=e[12];let x;e[13]!==b||e[14]!==_?(x=g.jsx("button",{onClick:b,className:"flex items-center gap-2 px-2 py-1 hover:bg-muted",children:_}),e[13]=b,e[14]=_,e[15]=x):x=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx(s1,{className:"size-3"}),e[16]=k):k=e[16];let N;e[17]!==i?(N=g.jsx("span",{className:"font-mono pr-2",children:i}),e[17]=i,e[18]=N):N=e[18];let A;e[19]!==f||e[20]!==v?(A=!f&&g.jsxs("span",{className:"text-xs text-muted-foreground/70",children:[v," lines"]}),e[19]=f,e[20]=v,e[21]=A):A=e[21];let M;e[22]!==l?(M=l===!1?g.jsxs("span",{className:"flex items-center gap-1 text-warning ml-auto mr-2",children:[g.jsx(Nu,{className:"size-3"}),"Overwrote"]}):g.jsxs("span",{className:"flex items-center gap-1 text-success ml-auto mr-2",children:[g.jsx(Ds,{className:"size-3"}),"Created"]}),e[22]=l,e[23]=M):M=e[23];let R;e[24]!==N||e[25]!==A||e[26]!==M||e[27]!==x?(R=g.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[x,k,N,A,M]}),e[24]=N,e[25]=A,e[26]=M,e[27]=x,e[28]=R):R=e[28];let j;e[29]===Symbol.for("react.memo_cache_sentinel")?(j={backgroundColor:"#282c34"},e[29]=j):j=e[29];let O;e[30]!==f||e[31]!==C?(O=$=>{const{tokens:V,getTokenProps:K}=$,G=f?V:V.slice(0,c7);return g.jsx(g.Fragment,{children:G.map((Y,Q)=>g.jsxs("div",{className:`flex font-mono text-xs ${C.has(Q+1)?"bg-yellow-500/20":""}`,children:[g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:Q+1}),g.jsx("span",{className:"pl-2 flex-1 whitespace-pre",children:Y.map((I,L)=>g.jsx("span",{...K({token:I})},L))})]},Q))})},e[30]=f,e[31]=C,e[32]=O):O=e[32];let B;e[33]!==n||e[34]!==y||e[35]!==O?(B=g.jsx("div",{style:j,children:g.jsx(tv,{theme:qu.oneDark,code:n,language:y,children:O})}),e[33]=n,e[34]=y,e[35]=O,e[36]=B):B=e[36];let q;return e[37]!==R||e[38]!==B?(q=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[R,B]})}),e[37]=R,e[38]=B,e[39]=q):q=e[39],q});function f7(t){const e=ve.c(3),{message:n}=t,i=n===void 0?"Success":n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(Gu,{className:"size-4"}),e[0]=o):o=e[0];let l;return e[1]!==i?(l=g.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o,g.jsx("span",{className:"break-all",children:i})]}),e[1]=i,e[2]=l):l=e[2],l}const h7={edit:p4,plus:oc,trash:ac,search:o1};function p7(t){const e=ve.c(7),{text:n}=t,[i,o]=D.useState(!1);let l;e[0]!==n?(l=async()=>{await navigator.clipboard.writeText(n),o(!0),setTimeout(()=>o(!1),1500)},e[0]=n,e[1]=l):l=e[1];const u=l;let a;e[2]!==i?(a=i?g.jsx("span",{className:"text-success text-xs",children:"Copied!"}):g.jsx(Ou,{className:"size-3"}),e[2]=i,e[3]=a):a=e[3];let d;return e[4]!==u||e[5]!==a?(d=g.jsx("button",{onClick:u,className:"text-muted-foreground hover:text-foreground transition-colors",title:"Copy path",children:a}),e[4]=u,e[5]=a,e[6]=d):d=e[6],d}function m7(t){const e=ve.c(16),{title:n,groups:i,files:o,total:l}=t;let u;e[0]!==o?(u=o||[],e[0]=o,e[1]=u):u=e[1];let a;e[2]!==u?(a={label:"Files",files:u,icon:void 0},e[2]=u,e[3]=a):a=e[3];const d=a;let f;e[4]!==d||e[5]!==o||e[6]!==i?(f=i||(o?[d]:[]),e[4]=d,e[5]=o,e[6]=i,e[7]=f):f=e[7];const p=f;if(p.length===0)return null;let h;e[8]!==n||e[9]!==l?(h=n&&g.jsxs("div",{className:"text-sm font-medium text-foreground",children:[n,l!==void 0&&g.jsxs("span",{className:"ml-2 text-muted-foreground",children:["(",l," files)"]})]}),e[8]=n,e[9]=l,e[10]=h):h=e[10];let y;e[11]!==p?(y=p.map(g7),e[11]=p,e[12]=y):y=e[12];let S;return e[13]!==h||e[14]!==y?(S=g.jsxs("div",{className:"flex flex-col gap-3",children:[h,y]}),e[13]=h,e[14]=y,e[15]=S):S=e[15],S}function g7(t,e){return g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.icon&&g.jsx("span",{className:"flex items-center",children:(()=>{const n=h7[t.icon];return g.jsx(n,{className:"size-3"})})()}),g.jsx("span",{children:t.label}),g.jsxs("span",{className:"text-muted-foreground/50",children:["(",t.files.length,")"]})]}),g.jsx("div",{className:"flex flex-col gap-0.5 pl-5",children:t.files.map(v7)})]},e)}function v7(t,e){return g.jsxs("div",{className:"flex items-center gap-2 text-xs group",children:[g.jsx(s1,{className:"size-3 text-muted-foreground shrink-0"}),g.jsx("span",{className:"font-mono text-foreground/80 truncate",children:t.path}),t.line!==void 0&&g.jsxs("span",{className:"text-muted-foreground shrink-0",children:[":",t.line]}),t.action&&g.jsx("span",{className:Ee("text-xs px-1 rounded shrink-0",t.action==="created"&&"bg-success/20 text-success",t.action==="modified"&&"bg-warning/20 text-warning",t.action==="deleted"&&"bg-destructive/20 text-destructive"),children:t.action}),g.jsx(p7,{text:t.path})]},e)}function _7(t){const e=ve.c(15),{command:n,stdout:i,stderr:o,exitCode:l}=t,u=l===0;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("span",{className:"text-muted-foreground",children:"$ "}),e[0]=a):a=e[0];let d;e[1]!==n?(d=g.jsxs("div",{className:"font-mono text-xs text-muted-foreground truncate flex-1 mr-2",children:[a,g.jsx("span",{className:"text-foreground",children:n})]}),e[1]=n,e[2]=d):d=e[2];const f=`text-xs font-mono px-2 py-0.5 rounded ${u?"bg-muted text-muted-foreground":"bg-red-500/20 text-red-400"}`;let p;e[3]!==l||e[4]!==f?(p=g.jsxs("span",{className:f,children:["[",l,"]"]}),e[3]=l,e[4]=f,e[5]=p):p=e[5];let h;e[6]!==d||e[7]!==p?(h=g.jsxs("div",{className:"bg-muted px-3 py-2 flex items-center justify-between",children:[d,p]}),e[6]=d,e[7]=p,e[8]=h):h=e[8];let y;e[9]!==o||e[10]!==i?(y=(i||o)&&g.jsxs("div",{className:"bg-black px-3 py-2 font-mono text-xs overflow-x-auto",children:[i&&g.jsx("pre",{className:"text-gray-300 whitespace-pre-wrap",children:i}),o&&g.jsx("pre",{className:"text-red-400 whitespace-pre-wrap mt-1",children:o})]}),e[9]=o,e[10]=i,e[11]=y):y=e[11];let S;return e[12]!==h||e[13]!==y?(S=g.jsxs("div",{className:"visualization-container border border-white/10 rounded-md overflow-hidden",children:[h,y]}),e[12]=h,e[13]=y,e[14]=S):S=e[14],S}const y7={pending:{icon:t4,color:"text-muted-foreground"},in_progress:{icon:Br,color:"text-warning",animate:!0},completed:{icon:Gu,color:"text-success"},cancelled:{icon:ih,color:"text-destructive"}},b7={high:{label:"high",className:"bg-destructive/20 text-destructive"},medium:{label:"",className:""},low:{label:"low",className:"text-muted-foreground"}};function x7(t){const e=ve.c(13),{title:n,items:i}=t;if(i.length===0)return null;let o;e[0]!==i?(o=i.filter(k7),e[0]=i,e[1]=o):o=e[1];const l=o.length;i.filter(C7),i.filter(w7);let u;e[2]!==l||e[3]!==i.length||e[4]!==n?(u=(n||i.length>0)&&g.jsxs("div",{className:"text-sm font-medium text-foreground",children:[n||"Todo List",g.jsxs("span",{className:"ml-2 text-muted-foreground",children:["(",i.length,")"]}),l>0&&g.jsxs("span",{className:"ml-2 text-success text-xs",children:[l," completed"]})]}),e[2]=l,e[3]=i.length,e[4]=n,e[5]=u):u=e[5];let a;e[6]!==i?(a=i.map(S7),e[6]=i,e[7]=a):a=e[7];let d;e[8]!==a?(d=g.jsx("div",{className:"flex flex-col gap-1 w-full",children:a}),e[8]=a,e[9]=d):d=e[9];let f;return e[10]!==u||e[11]!==d?(f=g.jsxs("div",{className:"flex flex-col gap-3 w-full overflow-hidden",children:[u,d]}),e[10]=u,e[11]=d,e[12]=f):f=e[12],f}function S7(t,e){const n=y7[t.status],i=n.icon,o=b7[t.priority];return g.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[g.jsx(i,{className:Ee("size-4 shrink-0",n.color,n.animate&&"animate-spin")}),g.jsx("span",{className:Ee("flex-1 break-all",t.status==="completed"&&"line-through text-muted-foreground",t.status==="cancelled"&&"text-muted-foreground"),children:t.content}),o.label&&t.priority==="high"&&g.jsx("span",{className:Ee("text-xs px-1.5 py-0.5 rounded shrink-0",o.className),children:o.label}),t.priority==="low"&&t.status!=="completed"&&t.status!=="cancelled"&&g.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:o.label})]},e)}function w7(t){return t.status==="pending"}function C7(t){return t.status==="in_progress"}function k7(t){return t.status==="completed"}const E7=D.memo(function(e){const n=ve.c(38),{visualization:i}=e;if(!i)return null;switch(i.type){case"diff":{let o;return n[0]!==i.additions||n[1]!==i.deletions||n[2]!==i.hunks||n[3]!==i.language||n[4]!==i.matchInfo||n[5]!==i.path?(o=g.jsx(qC,{path:i.path,hunks:i.hunks,language:i.language,additions:i.additions,deletions:i.deletions,matchInfo:i.matchInfo}),n[0]=i.additions,n[1]=i.deletions,n[2]=i.hunks,n[3]=i.language,n[4]=i.matchInfo,n[5]=i.path,n[6]=o):o=n[6],o}case"diffs":{let o;n[7]!==i.items?(o=i.items.map(A7),n[7]=i.items,n[8]=o):o=n[8];let l;return n[9]!==o?(l=g.jsx("div",{className:"space-y-3",children:o}),n[9]=o,n[10]=l):l=n[10],l}case"code":{let o;return n[11]!==i.content||n[12]!==i.created||n[13]!==i.highlightLines||n[14]!==i.language||n[15]!==i.path?(o=g.jsx(d7,{path:i.path,content:i.content,language:i.language,created:i.created,highlightLines:i.highlightLines}),n[11]=i.content,n[12]=i.created,n[13]=i.highlightLines,n[14]=i.language,n[15]=i.path,n[16]=o):o=n[16],o}case"file-list":{let o;return n[17]!==i.files||n[18]!==i.groups||n[19]!==i.title||n[20]!==i.total?(o=g.jsx(m7,{title:i.title,groups:i.groups,files:i.files,total:i.total}),n[17]=i.files,n[18]=i.groups,n[19]=i.title,n[20]=i.total,n[21]=o):o=n[21],o}case"table":{let o;n[22]!==i.rows?(o=JSON.stringify(i.rows,null,2),n[22]=i.rows,n[23]=o):o=n[23];let l;return n[24]!==o?(l=g.jsx("pre",{className:"text-xs bg-muted/50 border rounded-md p-2 overflow-x-auto",children:o}),n[24]=o,n[25]=l):l=n[25],l}case"markdown":{let o;return n[26]!==i.content?(o=g.jsx("div",{className:"prose prose-sm dark:prose-invert",children:i.content}),n[26]=i.content,n[27]=o):o=n[27],o}case"none":{let o;return n[28]!==i.message?(o=g.jsx(f7,{message:i.message}),n[28]=i.message,n[29]=o):o=n[29],o}case"shell-output":{let o;return n[30]!==i.command||n[31]!==i.exitCode||n[32]!==i.stderr||n[33]!==i.stdout?(o=g.jsx(_7,{command:i.command,stdout:i.stdout,stderr:i.stderr,exitCode:i.exitCode}),n[30]=i.command,n[31]=i.exitCode,n[32]=i.stderr,n[33]=i.stdout,n[34]=o):o=n[34],o}case"todo-list":{let o;return n[35]!==i.items||n[36]!==i.title?(o=g.jsx(x7,{title:i.title,items:i.items}),n[35]=i.items,n[36]=i.title,n[37]=o):o=n[37],o}default:return null}});function A7(t,e){return g.jsx(qC,{path:t.path,hunks:t.hunks,language:t.language,additions:t.additions,deletions:t.deletions,matchInfo:t.matchInfo},`${t.path}-${e}`)}function R7(t){switch(t){case"pending":return g.jsx(Px,{className:"size-3 text-warning"});case"running":return g.jsx(Br,{className:"size-3 text-warning animate-spin"});case"completed":return g.jsx(Gu,{className:"size-3 text-success"});case"error":return g.jsx(ih,{className:"size-3 text-destructive"});case"interrupted":return g.jsx(Ux,{className:"size-3 text-warning"});default:return null}}function T7(t){if(t&&typeof t=="object"&&"_visualization"in t)return t._visualization}const N7=(t,e)=>{if(t.part!==e.part||t.onNavigateToSubagent!==e.onNavigateToSubagent)return!1;if(t.part.state.status!=="pending")return!0;const i=t.pendingPermissions.find(l=>l.toolCallId===t.part.callId),o=e.pendingPermissions.find(l=>l.toolCallId===e.part.callId);return i===o},D7=D.memo(function({part:e,pendingPermissions:n,onPermissionResponse:i,onNavigateToSubagent:o}){var b;const[l,u]=D.useState(!1),[a,d]=D.useState(!1),f=e.state,p=f.status,h=p==="completed"&&"output"in f?T7(f.output):void 0,y=p==="pending"?n.find(_=>_.toolCallId===e.callId):void 0,S=y?typeof((b=y.args)==null?void 0:b.command)=="string"?y.args.command:JSON.stringify(y.args,null,2):null;let C=null;if(e.name==="task"){if("childSessionId"in f&&f.childSessionId)C=f.childSessionId;else if(p==="completed"&&"output"in f){const x=(typeof f.output=="string"?f.output:"").match(/task_id:\s*([a-f0-9-]{36})/i);x&&(C=x[1])}}const w=async()=>{if("output"in f){const _=typeof f.output=="string"?f.output:JSON.stringify(f.output,null,2);await navigator.clipboard.writeText(_),d(!0),setTimeout(()=>d(!1),2e3)}},v=(()=>{try{const _=JSON.stringify(f.input);return _.length>50?_.slice(0,47)+"...":_}catch{return String(f.input)}})();return g.jsxs("div",{className:"my-1",children:[g.jsxs(Mo,{open:l,onOpenChange:u,children:[g.jsx(jo,{asChild:!0,children:g.jsxs("div",{className:"flex items-center gap-2 py-1 cursor-pointer hover:text-foreground transition-colors text-muted-foreground",children:[l?g.jsx(sc,{className:"size-4 text-muted-foreground"}):g.jsx(Ai,{className:"size-4 text-muted-foreground"}),g.jsx(R5,{className:"size-3"}),g.jsx("span",{className:"text-xs truncate max-w-[120px] sm:max-w-none",children:e.name}),!l&&g.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate flex-1 min-w-0 sm:max-w-[200px] hidden sm:block",children:v}),g.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[R7(p),C&&o&&g.jsxs(ze,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 sm:w-auto sm:px-2",onClick:_=>{_.stopPropagation(),o(C)},title:"View session",children:[g.jsx(kg,{className:"size-3"}),g.jsx("span",{className:"hidden sm:inline ml-1",children:"View"})]})]})]})}),g.jsx(Oo,{children:g.jsxs("div",{className:"pl-5 pb-2 flex flex-col gap-2",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Input"}),g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:JSON.stringify(f.input,null,2)})]}),(p==="running"||p==="completed")&&C&&o&&g.jsxs(ze,{variant:"outline",className:"w-full",size:"sm",onClick:()=>o(C),children:[g.jsx(kg,{className:"size-4","data-icon":"inline-start"}),p==="running"?"Watch Subagent":"View Session"]}),p==="completed"&&"output"in f&&g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-1",children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground",children:"Output"}),g.jsx(ze,{variant:"ghost",size:"icon",onClick:w,className:"size-6",children:a?g.jsx(Ds,{className:"size-3 text-success"}):g.jsx(Ou,{className:"size-3"})})]}),g.jsx("pre",{className:"text-xs bg-success/10 border border-success/20 rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:typeof f.output=="string"?f.output:JSON.stringify(f.output,null,2)})]}),p==="error"&&"error"in f&&g.jsxs("div",{children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Error"}),g.jsx("pre",{className:"text-xs bg-destructive/10 border border-destructive/20 rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words text-destructive",children:f.error})]})]})})]}),p==="pending"&&y&&g.jsxs("div",{className:"border border-warning/50 bg-warning/10 rounded-md p-3 flex flex-col gap-3 mt-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Lu,{className:"size-4 text-warning"}),g.jsx(Kn,{variant:"outline",className:"text-warning border-warning",children:y.permissionType}),g.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:y.permissionKey})]}),y.message&&g.jsx("p",{className:"text-sm",children:y.message}),y.dangerous&&g.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive font-medium",children:[g.jsx(Lu,{className:"size-4"}),"This operation is marked as dangerous"]}),S&&g.jsxs(Mo,{children:[g.jsx(jo,{asChild:!0,children:g.jsxs("button",{className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full text-left",children:[g.jsx(Ai,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Oo,{children:g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 mt-1 overflow-x-auto whitespace-pre-wrap break-words overflow-wrap-break",children:S})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(ze,{variant:"outline",size:"sm",onClick:()=>i(e.callId,!1,!1),children:"Deny"}),g.jsx(ze,{variant:"secondary",size:"sm",onClick:()=>i(e.callId,!0,!1),children:"Approve"}),g.jsx(ze,{size:"sm",onClick:()=>i(e.callId,!0,!0),children:"Always Allow"})]})]}),p==="completed"&&h&&g.jsx("div",{className:"mt-2",children:g.jsx(E7,{visualization:h})})]})},N7);function M7(t){const e=ve.c(25),{prompts:n,query:i,selectedIndex:o,onSelect:l}=t;let u,a,d,f;if(e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==o){f=Symbol.for("react.early_return_sentinel");e:{let v;if(e[8]!==i?(v=_=>_.name.toLowerCase().includes(i.toLowerCase()),e[8]=i,e[9]=v):v=e[9],u=n.filter(v),u.length===0){let _;e[10]!==i?(_=g.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No prompts matching "/',i,'"']}),e[10]=i,e[11]=_):_=e[11],f=_;break e}a="p-1";let b;e[12]!==l||e[13]!==o?(b=(_,x)=>g.jsxs("button",{onClick:()=>l(_),className:Ee("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",x===o&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[g.jsx(L4,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"font-mono text-xs",children:["/",_.name]}),g.jsx("div",{className:"text-xs text-muted-foreground truncate",children:_.description})]})]},_.name),e[12]=l,e[13]=o,e[14]=b):b=e[14],d=u.map(b)}e[0]=l,e[1]=n,e[2]=i,e[3]=o,e[4]=u,e[5]=a,e[6]=d,e[7]=f}else u=e[4],a=e[5],d=e[6],f=e[7];if(f!==Symbol.for("react.early_return_sentinel"))return f;const p=u.length!==1?"s":"";let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↑↓"}),e[15]=h):h=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[16]=y):y=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"}),e[17]=S):S=e[17];let C;e[18]!==u.length||e[19]!==p?(C=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[u.length," prompt",p," •",h," navigate",y," select",S," close"]}),e[18]=u.length,e[19]=p,e[20]=C):C=e[20];let w;return e[21]!==a||e[22]!==d||e[23]!==C?(w=g.jsxs("div",{className:a,children:[d,C]}),e[21]=a,e[22]=d,e[23]=C,e[24]=w):w=e[24],w}function j7(t){const e=ve.c(9),{debounceMs:n}=t,[i,o]=D.useState(""),[l,u]=D.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const[d,f]=D.useState(a);let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=v=>{const b={type:"file",path:v.path,display:v.name};return f(_=>[..._,b]),u(!1),o(""),b},e[1]=p):p=e[1];const h=p,y=O7;let S;e[2]!==d?(S=v=>{const b=/@([^\s@]+)/g,_=[];let x;for(;(x=b.exec(v))!==null;){const k=x[1];d.some(N=>N.path===k)&&!_.some(N=>N.path===k)&&_.push({type:"file",path:k,display:k.split("/").pop()||k})}return _},e[2]=d,e[3]=S):S=e[3];const C=S;let w;return e[4]!==C||e[5]!==d||e[6]!==i||e[7]!==l?(w={query:i,setQuery:o,showAutocomplete:l,setShowAutocomplete:u,mentions:d,handleFileSelect:h,insertMention:y,extractMentions:C},e[4]=C,e[5]=d,e[6]=i,e[7]=l,e[8]=w):w=e[8],w}function O7(t,e,n){const i=t.lastIndexOf("@",e);if(i===-1)return{text:t,cursorPos:e};const o=t.slice(0,i)+`@${n.path}`+t.slice(e),l=i+n.path.length+1;return{text:o,cursorPos:l}}function L7(t,e){return e?t.content.includes("ARG")?t.content.replace("ARG",e):`${t.content}
|
|
533
|
+
${e}`:t.content}function I7(t){const e=t.trimStart();if(!e.startsWith("/"))return null;const n=e.indexOf(" ");return n===-1?{command:e.slice(1),rest:""}:{command:e.slice(1,n),rest:e.slice(n+1).trim()}}const B7=D.forwardRef(function(e,n){const i=ve.c(90),{onSendMessage:o,disabled:l,isStreaming:u,onStopStreaming:a,placeholder:d,workspaceId:f,serverUrl:p,apiToken:h,prompts:y}=e,S=d===void 0?"Type a message...":d;let C;i[0]!==y?(C=y===void 0?[]:y,i[0]=y,i[1]=C):C=i[1];const w=C,[v,b]=D.useState(""),[_,x]=D.useState(0);let k;i[2]===Symbol.for("react.memo_cache_sentinel")?(k=[],i[2]=k):k=i[2];const[N,A]=D.useState(k),[M,R]=D.useState(0),[j,O]=D.useState("none"),[B,q]=D.useState(""),$=D.useRef(null);let V,K;i[3]===Symbol.for("react.memo_cache_sentinel")?(V=()=>({focus:()=>{var be;return(be=$.current)==null?void 0:be.focus()}}),K=[],i[3]=V,i[4]=K):(V=i[3],K=i[4]),D.useImperativeHandle(n,V,K);const G=f||"";let Y;i[5]!==G?(Y={workspaceId:G},i[5]=G,i[6]=Y):Y=i[6];const{query:Q,setQuery:I,showAutocomplete:L,setShowAutocomplete:z,handleFileSelect:H,insertMention:F}=j7(Y);let J;i[7]===Symbol.for("react.memo_cache_sentinel")?(J=()=>{R(0)},i[7]=J):J=i[7];let ne;i[8]!==N||i[9]!==B||i[10]!==w?(ne=[N,B,w],i[8]=N,i[9]=B,i[10]=w,i[11]=ne):ne=i[11],D.useEffect(J,ne);let Z;i[12]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{const be=$.current;be&&(be.style.height="auto",be.style.height=`${Math.min(be.scrollHeight,150)}px`)},i[12]=Z):Z=i[12];let W;i[13]!==v?(W=[v],i[13]=v,i[14]=W):W=i[14],D.useEffect(Z,W);let U;if(i[15]!==B||i[16]!==w){let be;i[18]!==B?(be=et=>et.name.toLowerCase().includes(B.toLowerCase()),i[18]=B,i[19]=be):be=i[19],U=w.filter(be),i[15]=B,i[16]=w,i[17]=U}else U=i[17];const te=U,ie=j==="prompts"&&w.length>0,ae=j==="files"&&L&&!!f;let se;i[20]!==I||i[21]!==z?(se=be=>{const et=be.target.value,at=be.target.selectionStart||0;b(et),x(at);const St=et.lastIndexOf("/",at);if(St!==-1){const Ft=St>0?et[St-1]:`
|
|
534
|
+
`,Gt=et.slice(St+1,at);if((Ft===`
|
|
535
|
+
`||Ft===" "||Ft==="")&&!Gt.includes(" ")){q(Gt),O("prompts");return}}const Pt=et.lastIndexOf("@",at);if(Pt!==-1){const Ft=et.slice(Pt+1,at);if(!Ft.includes(" ")){I(Ft),z(!0),O("files");return}}O("none"),z(!1)},i[20]=I,i[21]=z,i[22]=se):se=i[22];const _e=se;let Te;i[23]!==_||i[24]!==H||i[25]!==v||i[26]!==F||i[27]!==z?(Te=be=>{const et=H(be),at=F(v,_,et);b(at.text),O("none"),z(!1),A([]),setTimeout(()=>{$.current&&($.current.focus(),$.current.setSelectionRange(at.cursorPos,at.cursorPos))},0)},i[23]=_,i[24]=H,i[25]=v,i[26]=F,i[27]=z,i[28]=Te):Te=i[28];const De=Te;let Ke;i[29]!==_||i[30]!==v?(Ke=be=>{const et=v.lastIndexOf("/",_),at=v.slice(0,et),St=v.slice(et+1),Pt=St.indexOf(" "),Ft=Pt!==-1?St.slice(Pt):"",Gt=`${at}/${be.name}${Ft}`,$t=et+1+be.name.length+0;b(Gt),O("none"),setTimeout(()=>{$.current&&($.current.focus(),$.current.setSelectionRange($t,$t))},0)},i[29]=_,i[30]=v,i[31]=Ke):Ke=i[31];const Ae=Ke;let rt;i[32]!==l||i[33]!==v||i[34]!==o||i[35]!==w?(rt=be=>{if(be==null||be.preventDefault(),!v.trim()||l)return;const et=I7(v);if(et){const at=w.find(St=>St.name===et.command);if(at){const St=L7(at,et.rest);o(St),b("");return}}o(v.trim()),b("")},i[32]=l,i[33]=v,i[34]=o,i[35]=w,i[36]=rt):rt=i[36];const Je=rt;let Qe;i[37]!==N||i[38]!==te||i[39]!==De||i[40]!==Ae||i[41]!==Je||i[42]!==M||i[43]!==z||i[44]!==ae||i[45]!==ie?(Qe=be=>{if(!be.nativeEvent.isComposing){if(ie&&te.length>0)switch(be.key){case"ArrowDown":{be.preventDefault(),R(et=>Math.min(et+1,te.length-1));return}case"ArrowUp":{be.preventDefault(),R(z7);return}case"Enter":{if(be.shiftKey)return;be.preventDefault(),te[M]&&Ae(te[M]);return}case"Tab":{be.preventDefault(),te[M]&&Ae(te[M]);return}case"Escape":{be.preventDefault(),O("none");return}}if(ae&&N.length>0)switch(be.key){case"ArrowDown":{be.preventDefault(),R(et=>Math.min(et+1,N.length-1));return}case"ArrowUp":{be.preventDefault(),R(P7);return}case"Enter":{be.preventDefault(),N[M]&&De(N[M]);return}case"Escape":{be.preventDefault(),z(!1),O("none");return}case"Tab":{be.preventDefault(),N[M]&&De(N[M]);return}}be.key==="Enter"&&!be.shiftKey&&(be.preventDefault(),Je())}},i[37]=N,i[38]=te,i[39]=De,i[40]=Ae,i[41]=Je,i[42]=M,i[43]=z,i[44]=ae,i[45]=ie,i[46]=Qe):Qe=i[46];const ot=Qe;let ue;i[47]===Symbol.for("react.memo_cache_sentinel")?(ue=be=>{A(be)},i[47]=ue):ue=i[47];const it=ue;if(u&&a){let be;i[48]===Symbol.for("react.memo_cache_sentinel")?(be=g.jsxs("div",{className:"animate-pulse flex items-center gap-2 text-muted-foreground",children:[g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce"}),g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce [animation-delay:0.2s]"}),g.jsx("span",{className:"text-sm ml-2",children:"Generating..."})]}),i[48]=be):be=i[48];let et;i[49]===Symbol.for("react.memo_cache_sentinel")?(et=g.jsx(Wx,{className:"size-4","data-icon":"inline-start"}),i[49]=et):et=i[49];let at;return i[50]!==a?(at=g.jsx("div",{className:"p-4 border-t border-border bg-card",children:g.jsxs("div",{className:"flex items-center justify-center gap-3",children:[be,g.jsxs(ze,{variant:"outline",size:"sm",onClick:a,children:[et,"Stop"]})]})}),i[50]=a,i[51]=at):at=i[51],at}const Ze=ie||ae;let dt;i[52]!==z?(dt=be=>{be||(O("none"),z(!1))},i[52]=z,i[53]=dt):dt=i[53];let ce;i[54]===Symbol.for("react.memo_cache_sentinel")?(ce=Ee("min-h-[44px] max-h-[150px] resize-none pr-12","focus-visible:ring-1"),i[54]=ce):ce=i[54];let xe;i[55]!==l||i[56]!==_e||i[57]!==ot||i[58]!==v||i[59]!==S?(xe=g.jsx(L8,{asChild:!0,children:g.jsx(N8,{ref:$,value:v,onChange:_e,onKeyDown:ot,placeholder:S,disabled:l,className:ce,rows:1,"data-chat-input":"true"})}),i[55]=l,i[56]=_e,i[57]=ot,i[58]=v,i[59]=S,i[60]=xe):xe=i[60];let pe;i[61]!==h||i[62]!==De||i[63]!==Ae||i[64]!==B||i[65]!==w||i[66]!==Q||i[67]!==M||i[68]!==p||i[69]!==ae||i[70]!==f?(pe=g.jsx(Lh,{className:"w-72 p-0",align:"start",side:"top",sideOffset:8,onOpenAutoFocus:F7,onCloseAutoFocus:H7,children:ae?g.jsx(vj,{workspaceId:f||"",searchQuery:Q,selectedIndex:M,onSelect:De,onFilesChange:it,serverUrl:p,apiToken:h}):g.jsx(M7,{prompts:w,query:B,selectedIndex:M,onSelect:Ae})}),i[61]=h,i[62]=De,i[63]=Ae,i[64]=B,i[65]=w,i[66]=Q,i[67]=M,i[68]=p,i[69]=ae,i[70]=f,i[71]=pe):pe=i[71];let Me;i[72]!==Ze||i[73]!==dt||i[74]!==xe||i[75]!==pe?(Me=g.jsx("div",{className:"flex-1 relative",children:g.jsxs(Oh,{open:Ze,onOpenChange:dt,children:[xe,pe]})}),i[72]=Ze,i[73]=dt,i[74]=xe,i[75]=pe,i[76]=Me):Me=i[76];let Le;i[77]!==l||i[78]!==v?(Le=!v.trim()||l,i[77]=l,i[78]=v,i[79]=Le):Le=i[79];let nt;i[80]===Symbol.for("react.memo_cache_sentinel")?(nt=g.jsx(r5,{className:"size-4"}),i[80]=nt):nt=i[80];let je;i[81]!==Le?(je=g.jsx(ze,{type:"submit",disabled:Le,size:"default",className:"h-11",children:nt}),i[81]=Le,i[82]=je):je=i[82];let Ve;i[83]!==Me||i[84]!==je?(Ve=g.jsxs("div",{className:"flex gap-3 items-end",children:[Me,je]}),i[83]=Me,i[84]=je,i[85]=Ve):Ve=i[85];let ct;i[86]===Symbol.for("react.memo_cache_sentinel")?(ct=g.jsxs("div",{className:"mt-2 text-xs text-muted-foreground text-center hidden sm:flex items-center justify-center gap-1",children:[g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"/"}),g.jsx("span",{children:"prompts"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"@"}),g.jsx("span",{children:"files"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"Enter"}),g.jsx("span",{children:"to send"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"Shift + Enter"}),g.jsx("span",{children:"for new line"})]}),i[86]=ct):ct=i[86];let Tt;return i[87]!==Je||i[88]!==Ve?(Tt=g.jsxs("form",{onSubmit:Je,className:"p-4 border-t border-border bg-card",children:[Ve,ct]}),i[87]=Je,i[88]=Ve,i[89]=Tt):Tt=i[89],Tt});function z7(t){return Math.max(t-1,0)}function P7(t){return Math.max(t-1,0)}function F7(t){return t.preventDefault()}function H7(t){return t.preventDefault()}function U7(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,q7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V7={};function Bb(t,e){return(V7.jsx?q7:$7).test(t)}const W7=/[ \t\n\f\r]/g;function G7(t){return typeof t=="object"?t.type==="text"?zb(t.value):!1:zb(t)}function zb(t){return t.replace(W7,"")===""}class dd{constructor(e,n,i){this.normal=n,this.property=e,i&&(this.space=i)}}dd.prototype.normal={};dd.prototype.property={};dd.prototype.space=void 0;function VC(t,e){const n={},i={};for(const o of t)Object.assign(n,o.property),Object.assign(i,o.normal);return new dd(n,i,e)}function Gg(t){return t.toLowerCase()}class _r{constructor(e,n){this.attribute=n,this.property=e}}_r.prototype.attribute="";_r.prototype.booleanish=!1;_r.prototype.boolean=!1;_r.prototype.commaOrSpaceSeparated=!1;_r.prototype.commaSeparated=!1;_r.prototype.defined=!1;_r.prototype.mustUseProperty=!1;_r.prototype.number=!1;_r.prototype.overloadedBoolean=!1;_r.prototype.property="";_r.prototype.spaceSeparated=!1;_r.prototype.space=void 0;let K7=0;const mt=Ha(),hn=Ha(),Kg=Ha(),Ne=Ha(),qt=Ha(),Zl=Ha(),Lr=Ha();function Ha(){return 2**++K7}const Yg=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:hn,commaOrSpaceSeparated:Lr,commaSeparated:Zl,number:Ne,overloadedBoolean:Kg,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),og=Object.keys(Yg);class nv extends _r{constructor(e,n,i,o){let l=-1;if(super(e,n),Pb(this,"space",o),typeof i=="number")for(;++l<og.length;){const u=og[l];Pb(this,og[l],(i&Yg[u])===Yg[u])}}}nv.prototype.defined=!0;function Pb(t,e,n){n&&(t[e]=n)}function bc(t){const e={},n={};for(const[i,o]of Object.entries(t.properties)){const l=new nv(i,t.transform(t.attributes||{},i),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),e[i]=l,n[Gg(i)]=i,n[Gg(l.attribute)]=i}return new dd(e,n,t.space)}const WC=bc({properties:{ariaActiveDescendant:null,ariaAtomic:hn,ariaAutoComplete:null,ariaBusy:hn,ariaChecked:hn,ariaColCount:Ne,ariaColIndex:Ne,ariaColSpan:Ne,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:hn,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:hn,ariaFlowTo:qt,ariaGrabbed:hn,ariaHasPopup:null,ariaHidden:hn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:Ne,ariaLive:null,ariaModal:hn,ariaMultiLine:hn,ariaMultiSelectable:hn,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:Ne,ariaPressed:hn,ariaReadOnly:hn,ariaRelevant:null,ariaRequired:hn,ariaRoleDescription:qt,ariaRowCount:Ne,ariaRowIndex:Ne,ariaRowSpan:Ne,ariaSelected:hn,ariaSetSize:Ne,ariaSort:null,ariaValueMax:Ne,ariaValueMin:Ne,ariaValueNow:Ne,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function GC(t,e){return e in t?t[e]:e}function KC(t,e){return GC(t,e.toLowerCase())}const Y7=bc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zl,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:qt,autoFocus:mt,autoPlay:mt,blocking:qt,capture:null,charSet:null,checked:mt,cite:null,className:qt,cols:Ne,colSpan:null,content:null,contentEditable:hn,controls:mt,controlsList:qt,coords:Ne|Zl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:Kg,draggable:hn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:qt,height:Ne,hidden:Kg,high:Ne,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:qt,itemRef:qt,itemScope:mt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:Ne,manifest:null,max:null,maxLength:Ne,media:null,method:null,min:null,minLength:Ne,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mt,optimum:Ne,pattern:null,ping:qt,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:qt,required:mt,reversed:mt,rows:Ne,rowSpan:Ne,sandbox:qt,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:Ne,sizes:null,slot:null,span:Ne,spellCheck:hn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ne,step:null,style:null,tabIndex:Ne,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:hn,width:Ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:Ne,borderColor:null,bottomMargin:Ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ne,leftMargin:Ne,link:null,longDesc:null,lowSrc:null,marginHeight:Ne,marginWidth:Ne,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ne,rules:null,scheme:null,scrolling:hn,standby:null,summary:null,text:null,topMargin:Ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:Ne,security:null,unselectable:null},space:"html",transform:KC}),X7=bc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Lr,accentHeight:Ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ne,amplitude:Ne,arabicForm:null,ascent:Ne,attributeName:null,attributeType:null,azimuth:Ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ne,by:null,calcMode:null,capHeight:Ne,className:qt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ne,diffuseConstant:Ne,direction:null,display:null,dur:null,divisor:Ne,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ne,enableBackground:null,end:null,event:null,exponent:Ne,externalResourcesRequired:null,fill:null,fillOpacity:Ne,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Zl,g2:Zl,glyphName:Zl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ne,horizOriginX:Ne,horizOriginY:Ne,id:null,ideographic:Ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ne,k:Ne,k1:Ne,k2:Ne,k3:Ne,k4:Ne,kernelMatrix:Lr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ne,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ne,overlineThickness:Ne,paintOrder:null,panose1:null,path:null,pathLength:Ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ne,pointsAtY:Ne,pointsAtZ:Ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Lr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Lr,rev:Lr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Lr,requiredFeatures:Lr,requiredFonts:Lr,requiredFormats:Lr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ne,specularExponent:Ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ne,strikethroughThickness:Ne,string:null,stroke:null,strokeDashArray:Lr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ne,strokeOpacity:Ne,strokeWidth:null,style:null,surfaceScale:Ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Lr,tabIndex:Ne,tableValues:null,target:null,targetX:Ne,targetY:Ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Lr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ne,underlineThickness:Ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ne,values:null,vAlphabetic:Ne,vMathematical:Ne,vectorEffect:null,vHanging:Ne,vIdeographic:Ne,version:null,vertAdvY:Ne,vertOriginX:Ne,vertOriginY:Ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:GC}),YC=bc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),XC=bc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:KC}),QC=bc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Q7={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Z7=/[A-Z]/g,Fb=/-[a-z]/g,J7=/^data[-\w.:]+$/i;function eL(t,e){const n=Gg(e);let i=e,o=_r;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&J7.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace(Fb,nL);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!Fb.test(l)){let u=l.replace(Z7,tL);u.charAt(0)!=="-"&&(u="-"+u),e="data"+u}}o=nv}return new o(i,e)}function tL(t){return"-"+t.toLowerCase()}function nL(t){return t.charAt(1).toUpperCase()}const rL=VC([WC,Y7,YC,XC,QC],"html"),rv=VC([WC,X7,YC,XC,QC],"svg");function iL(t){return t.join(" ").trim()}var Hl={},ag,Hb;function sL(){if(Hb)return ag;Hb=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,a=/^\s+|\s+$/g,d=`
|
|
536
|
+
`,f="/",p="*",h="",y="comment",S="declaration";function C(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var _=1,x=1;function k(V){var K=V.match(e);K&&(_+=K.length);var G=V.lastIndexOf(d);x=~G?V.length-G:x+V.length}function N(){var V={line:_,column:x};return function(K){return K.position=new A(V),j(),K}}function A(V){this.start=V,this.end={line:_,column:x},this.source=b.source}A.prototype.content=v;function M(V){var K=new Error(b.source+":"+_+":"+x+": "+V);if(K.reason=V,K.filename=b.source,K.line=_,K.column=x,K.source=v,!b.silent)throw K}function R(V){var K=V.exec(v);if(K){var G=K[0];return k(G),v=v.slice(G.length),K}}function j(){R(n)}function O(V){var K;for(V=V||[];K=B();)K!==!1&&V.push(K);return V}function B(){var V=N();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var K=2;h!=v.charAt(K)&&(p!=v.charAt(K)||f!=v.charAt(K+1));)++K;if(K+=2,h===v.charAt(K-1))return M("End of comment missing");var G=v.slice(2,K-2);return x+=2,k(G),v=v.slice(K),x+=2,V({type:y,comment:G})}}function q(){var V=N(),K=R(i);if(K){if(B(),!R(o))return M("property missing ':'");var G=R(l),Y=V({type:S,property:w(K[0].replace(t,h)),value:G?w(G[0].replace(t,h)):h});return R(u),Y}}function $(){var V=[];O(V);for(var K;K=q();)K!==!1&&(V.push(K),O(V));return V}return j(),$()}function w(v){return v?v.replace(a,h):h}return ag=C,ag}var Ub;function oL(){if(Ub)return Hl;Ub=1;var t=Hl&&Hl.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.default=n;const e=t(sL());function n(i,o){let l=null;if(!i||typeof i!="string")return l;const u=(0,e.default)(i),a=typeof o=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;a?o(f,p,d):p&&(l=l||{},l[f]=p)}),l}return Hl}var bu={},$b;function aL(){if($b)return bu;$b=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(f){return!f||n.test(f)||t.test(f)},u=function(f,p){return p.toUpperCase()},a=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),l(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,a):f=f.replace(i,a),f.replace(e,u))};return bu.camelCase=d,bu}var xu,qb;function lL(){if(qb)return xu;qb=1;var t=xu&&xu.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},e=t(oL()),n=aL();function i(o,l){var u={};return!o||typeof o!="string"||(0,e.default)(o,function(a,d){a&&d&&(u[(0,n.camelCase)(a,l)]=d)}),u}return i.default=i,xu=i,xu}var cL=lL();const uL=nh(cL),ZC=JC("end"),iv=JC("start");function JC(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function dL(t){const e=iv(t),n=ZC(t);if(e&&n)return{start:e,end:n}}function Du(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Vb(t.position):"start"in t||"end"in t?Vb(t):"line"in t||"column"in t?Xg(t):""}function Xg(t){return Wb(t&&t.line)+":"+Wb(t&&t.column)}function Vb(t){return Xg(t&&t.start)+"-"+Xg(t&&t.end)}function Wb(t){return t&&typeof t=="number"?t:1}class Xn extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",l={},u=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof e=="string"?o=e:!l.cause&&e&&(u=!0,o=e.message,l.cause=e),!l.ruleId&&!l.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?l.ruleId=i:(l.source=i.slice(0,d),l.ruleId=i.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=Du(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=u&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Xn.prototype.file="";Xn.prototype.name="";Xn.prototype.reason="";Xn.prototype.message="";Xn.prototype.stack="";Xn.prototype.column=void 0;Xn.prototype.line=void 0;Xn.prototype.ancestors=void 0;Xn.prototype.cause=void 0;Xn.prototype.fatal=void 0;Xn.prototype.place=void 0;Xn.prototype.ruleId=void 0;Xn.prototype.source=void 0;const sv={}.hasOwnProperty,fL=new Map,hL=/[A-Z]/g,pL=new Set(["table","tbody","thead","tfoot","tr"]),mL=new Set(["td","th"]),e3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gL(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=CL(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=wL(n,e.jsx,e.jsxs)}const o={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?rv:rL,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},l=t3(o,t,void 0);return l&&typeof l!="string"?l:o.create(t,o.Fragment,{children:l||void 0},void 0)}function t3(t,e,n){if(e.type==="element")return vL(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return _L(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return bL(t,e,n);if(e.type==="mdxjsEsm")return yL(t,e);if(e.type==="root")return xL(t,e,n);if(e.type==="text")return SL(t,e)}function vL(t,e,n){const i=t.schema;let o=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=rv,t.schema=o),t.ancestors.push(e);const l=r3(t,e.tagName,!1),u=kL(t,e);let a=av(t,e);return pL.has(e.tagName)&&(a=a.filter(function(d){return typeof d=="string"?!G7(d):!0})),n3(t,u,l,e),ov(u,a),t.ancestors.pop(),t.schema=i,t.create(e,l,u,n)}function _L(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Vu(t,e.position)}function yL(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Vu(t,e.position)}function bL(t,e,n){const i=t.schema;let o=i;e.name==="svg"&&i.space==="html"&&(o=rv,t.schema=o),t.ancestors.push(e);const l=e.name===null?t.Fragment:r3(t,e.name,!0),u=EL(t,e),a=av(t,e);return n3(t,u,l,e),ov(u,a),t.ancestors.pop(),t.schema=i,t.create(e,l,u,n)}function xL(t,e,n){const i={};return ov(i,av(t,e)),t.create(e,t.Fragment,i,n)}function SL(t,e){return e.value}function n3(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function ov(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function wL(t,e,n){return i;function i(o,l,u,a){const f=Array.isArray(u.children)?n:e;return a?f(l,u,a):f(l,u)}}function CL(t,e){return n;function n(i,o,l,u){const a=Array.isArray(l.children),d=iv(i);return e(o,l,u,a,{columnNumber:d?d.column-1:void 0,fileName:t,lineNumber:d?d.line:void 0},void 0)}}function kL(t,e){const n={};let i,o;for(o in e.properties)if(o!=="children"&&sv.call(e.properties,o)){const l=AL(t,o,e.properties[o]);if(l){const[u,a]=l;t.tableCellAlignToStyle&&u==="align"&&typeof a=="string"&&mL.has(e.tagName)?i=a:n[u]=a}}if(i){const l=n.style||(n.style={});l[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function EL(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const l=i.data.estree.body[0];l.type;const u=l.expression;u.type;const a=u.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else Vu(t,e.position);else{const o=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const a=i.value.data.estree.body[0];a.type,l=t.evaluater.evaluateExpression(a.expression)}else Vu(t,e.position);else l=i.value===null?!0:i.value;n[o]=l}return n}function av(t,e){const n=[];let i=-1;const o=t.passKeys?new Map:fL;for(;++i<e.children.length;){const l=e.children[i];let u;if(t.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const f=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const a=t3(t,l,u);a!==void 0&&n.push(a)}return n}function AL(t,e,n){const i=eL(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?U7(n):iL(n)),i.property==="style"){let o=typeof n=="object"?n:RL(t,String(n));return t.stylePropertyNameCase==="css"&&(o=TL(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&i.space?Q7[i.property]||i.property:i.attribute,n]}}function RL(t,e){try{return uL(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const i=n,o=new Xn("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=e3+"#cannot-parse-style-attribute",o}}function r3(t,e,n){let i;if(!n)i={type:"Literal",value:e};else if(e.includes(".")){const o=e.split(".");let l=-1,u;for(;++l<o.length;){const a=Bb(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};u=u?{type:"MemberExpression",object:u,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}i=u}else i=Bb(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const o=i.value;return sv.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(i);Vu(t)}function Vu(t,e){const n=new Xn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=e3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function TL(t){const e={};let n;for(n in t)sv.call(t,n)&&(e[NL(n)]=t[n]);return e}function NL(t){let e=t.replace(hL,DL);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function DL(t){return"-"+t.toLowerCase()}const lg={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ML={};function lv(t,e){const n=ML,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return i3(t,i,o)}function i3(t,e,n){if(jL(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Gb(t.children,e,n)}return Array.isArray(t)?Gb(t,e,n):""}function Gb(t,e,n){const i=[];let o=-1;for(;++o<t.length;)i[o]=i3(t[o],e,n);return i.join("")}function jL(t){return!!(t&&typeof t=="object")}const Kb=document.createElement("i");function cv(t){const e="&"+t+";";Kb.innerHTML=e;const n=Kb.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function Fr(t,e,n,i){const o=t.length;let l=0,u;if(e<0?e=-e>o?0:o+e:e=e>o?o:e,n=n>0?n:0,i.length<1e4)u=Array.from(i),u.unshift(e,n),t.splice(...u);else for(n&&t.splice(e,n);l<i.length;)u=i.slice(l,l+1e4),u.unshift(e,0),t.splice(...u),l+=1e4,e+=1e4}function ri(t,e){return t.length>0?(Fr(t,t.length,0,e),t):e}const Yb={}.hasOwnProperty;function s3(t){const e={};let n=-1;for(;++n<t.length;)OL(e,t[n]);return e}function OL(t,e){let n;for(n in e){const o=(Yb.call(t,n)?t[n]:void 0)||(t[n]={}),l=e[n];let u;if(l)for(u in l){Yb.call(o,u)||(o[u]=[]);const a=l[u];LL(o[u],Array.isArray(a)?a:a?[a]:[])}}}function LL(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);Fr(t,0,0,i)}function o3(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ei(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const sr=Fo(/[A-Za-z]/),Yn=Fo(/[\dA-Za-z]/),IL=Fo(/[#-'*+\--9=?A-Z^-~]/);function Zf(t){return t!==null&&(t<32||t===127)}const Qg=Fo(/\d/),BL=Fo(/[\dA-Fa-f]/),zL=Fo(/[!-/:-@[-`{-~]/);function st(t){return t!==null&&t<-2}function Ut(t){return t!==null&&(t<0||t===32)}function xt(t){return t===-2||t===-1||t===32}const $h=Fo(new RegExp("\\p{P}|\\p{S}","u")),Ia=Fo(/\s/);function Fo(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function xc(t){const e=[];let n=-1,i=0,o=0;for(;++n<t.length;){const l=t.charCodeAt(n);let u="";if(l===37&&Yn(t.charCodeAt(n+1))&&Yn(t.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(u=String.fromCharCode(l));else if(l>55295&&l<57344){const a=t.charCodeAt(n+1);l<56320&&a>56319&&a<57344?(u=String.fromCharCode(l,a),o=1):u="�"}else u=String.fromCharCode(l);u&&(e.push(t.slice(i,n),encodeURIComponent(u)),i=n+o+1,u=""),o&&(n+=o,o=0)}return e.join("")+t.slice(i)}function Et(t,e,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let l=0;return u;function u(d){return xt(d)?(t.enter(n),a(d)):e(d)}function a(d){return xt(d)&&l++<o?(t.consume(d),a):(t.exit(n),e(d))}}const PL={tokenize:FL};function FL(t){const e=t.attempt(this.parser.constructs.contentInitial,i,o);let n;return e;function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Et(t,e,"linePrefix")}function o(a){return t.enter("paragraph"),l(a)}function l(a){const d=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(a)}function u(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return st(a)?(t.consume(a),t.exit("chunkText"),l):(t.consume(a),u)}}const HL={tokenize:UL},Xb={tokenize:$L};function UL(t){const e=this,n=[];let i=0,o,l,u;return a;function a(x){if(i<n.length){const k=n[i];return e.containerState=k[1],t.attempt(k[0].continuation,d,f)(x)}return f(x)}function d(x){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,o&&_();const k=e.events.length;let N=k,A;for(;N--;)if(e.events[N][0]==="exit"&&e.events[N][1].type==="chunkFlow"){A=e.events[N][1].end;break}b(i);let M=k;for(;M<e.events.length;)e.events[M][1].end={...A},M++;return Fr(e.events,N+1,0,e.events.slice(k)),e.events.length=M,f(x)}return a(x)}function f(x){if(i===n.length){if(!o)return y(x);if(o.currentConstruct&&o.currentConstruct.concrete)return C(x);e.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Xb,p,h)(x)}function p(x){return o&&_(),b(i),y(x)}function h(x){return e.parser.lazy[e.now().line]=i!==n.length,u=e.now().offset,C(x)}function y(x){return e.containerState={},t.attempt(Xb,S,C)(x)}function S(x){return i++,n.push([e.currentConstruct,e.containerState]),y(x)}function C(x){if(x===null){o&&_(),b(0),t.consume(x);return}return o=o||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),w(x)}function w(x){if(x===null){v(t.exit("chunkFlow"),!0),b(0),t.consume(x);return}return st(x)?(t.consume(x),v(t.exit("chunkFlow")),i=0,e.interrupt=void 0,a):(t.consume(x),w)}function v(x,k){const N=e.sliceStream(x);if(k&&N.push(null),x.previous=l,l&&(l.next=x),l=x,o.defineSkip(x.start),o.write(N),e.parser.lazy[x.start.line]){let A=o.events.length;for(;A--;)if(o.events[A][1].start.offset<u&&(!o.events[A][1].end||o.events[A][1].end.offset>u))return;const M=e.events.length;let R=M,j,O;for(;R--;)if(e.events[R][0]==="exit"&&e.events[R][1].type==="chunkFlow"){if(j){O=e.events[R][1].end;break}j=!0}for(b(i),A=M;A<e.events.length;)e.events[A][1].end={...O},A++;Fr(e.events,R+1,0,e.events.slice(M)),e.events.length=A}}function b(x){let k=n.length;for(;k-- >x;){const N=n[k];e.containerState=N[1],N[0].exit.call(e,t)}n.length=x}function _(){o.write([null]),l=void 0,o=void 0,e.containerState._closeFlow=void 0}}function $L(t,e,n){return Et(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ic(t){if(t===null||Ut(t)||Ia(t))return 1;if($h(t))return 2}function qh(t,e,n){const i=[];let o=-1;for(;++o<t.length;){const l=t[o].resolveAll;l&&!i.includes(l)&&(e=l(e,n),i.push(l))}return e}const Zg={name:"attention",resolveAll:qL,tokenize:VL};function qL(t,e){let n=-1,i,o,l,u,a,d,f,p;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(i=n;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[i][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;d=t[i][1].end.offset-t[i][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const h={...t[i][1].end},y={...t[n][1].start};Qb(h,-d),Qb(y,d),u={type:d>1?"strongSequence":"emphasisSequence",start:h,end:{...t[i][1].end}},a={type:d>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:y},l={type:d>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...u.start},end:{...a.end}},t[i][1].end={...u.start},t[n][1].start={...a.end},f=[],t[i][1].end.offset-t[i][1].start.offset&&(f=ri(f,[["enter",t[i][1],e],["exit",t[i][1],e]])),f=ri(f,[["enter",o,e],["enter",u,e],["exit",u,e],["enter",l,e]]),f=ri(f,qh(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),f=ri(f,[["exit",l,e],["enter",a,e],["exit",a,e],["exit",o,e]]),t[n][1].end.offset-t[n][1].start.offset?(p=2,f=ri(f,[["enter",t[n][1],e],["exit",t[n][1],e]])):p=0,Fr(t,i-1,n-i+3,f),n=i+f.length-p-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function VL(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=ic(i);let l;return u;function u(d){return l=d,t.enter("attentionSequence"),a(d)}function a(d){if(d===l)return t.consume(d),a;const f=t.exit("attentionSequence"),p=ic(d),h=!p||p===2&&o||n.includes(d),y=!o||o===2&&p||n.includes(i);return f._open=!!(l===42?h:h&&(o||!y)),f._close=!!(l===42?y:y&&(p||!h)),e(d)}}function Qb(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const WL={name:"autolink",tokenize:GL};function GL(t,e,n){let i=0;return o;function o(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),l}function l(S){return sr(S)?(t.consume(S),u):S===64?n(S):f(S)}function u(S){return S===43||S===45||S===46||Yn(S)?(i=1,a(S)):f(S)}function a(S){return S===58?(t.consume(S),i=0,d):(S===43||S===45||S===46||Yn(S))&&i++<32?(t.consume(S),a):(i=0,f(S))}function d(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),e):S===null||S===32||S===60||Zf(S)?n(S):(t.consume(S),d)}function f(S){return S===64?(t.consume(S),p):IL(S)?(t.consume(S),f):n(S)}function p(S){return Yn(S)?h(S):n(S)}function h(S){return S===46?(t.consume(S),i=0,p):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),e):y(S)}function y(S){if((S===45||Yn(S))&&i++<63){const C=S===45?y:h;return t.consume(S),C}return n(S)}}const fd={partial:!0,tokenize:KL};function KL(t,e,n){return i;function i(l){return xt(l)?Et(t,o,"linePrefix")(l):o(l)}function o(l){return l===null||st(l)?e(l):n(l)}}const a3={continuation:{tokenize:XL},exit:QL,name:"blockQuote",tokenize:YL};function YL(t,e,n){const i=this;return o;function o(u){if(u===62){const a=i.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(u),t.exit("blockQuoteMarker"),l}return n(u)}function l(u){return xt(u)?(t.enter("blockQuotePrefixWhitespace"),t.consume(u),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(u))}}function XL(t,e,n){const i=this;return o;function o(u){return xt(u)?Et(t,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):l(u)}function l(u){return t.attempt(a3,e,n)(u)}}function QL(t){t.exit("blockQuote")}const l3={name:"characterEscape",tokenize:ZL};function ZL(t,e,n){return i;function i(l){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(l),t.exit("escapeMarker"),o}function o(l){return zL(l)?(t.enter("characterEscapeValue"),t.consume(l),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(l)}}const c3={name:"characterReference",tokenize:JL};function JL(t,e,n){const i=this;let o=0,l,u;return a;function a(h){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),d}function d(h){return h===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(h),t.exit("characterReferenceMarkerNumeric"),f):(t.enter("characterReferenceValue"),l=31,u=Yn,p(h))}function f(h){return h===88||h===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(h),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),l=6,u=BL,p):(t.enter("characterReferenceValue"),l=7,u=Qg,p(h))}function p(h){if(h===59&&o){const y=t.exit("characterReferenceValue");return u===Yn&&!cv(i.sliceSerialize(y))?n(h):(t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return u(h)&&o++<l?(t.consume(h),p):n(h)}}const Zb={partial:!0,tokenize:t9},Jb={concrete:!0,name:"codeFenced",tokenize:e9};function e9(t,e,n){const i=this,o={partial:!0,tokenize:N};let l=0,u=0,a;return d;function d(A){return f(A)}function f(A){const M=i.events[i.events.length-1];return l=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=A,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),p(A)}function p(A){return A===a?(u++,t.consume(A),p):u<3?n(A):(t.exit("codeFencedFenceSequence"),xt(A)?Et(t,h,"whitespace")(A):h(A))}function h(A){return A===null||st(A)?(t.exit("codeFencedFence"),i.interrupt?e(A):t.check(Zb,w,k)(A)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===null||st(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),h(A)):xt(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Et(t,S,"whitespace")(A)):A===96&&A===a?n(A):(t.consume(A),y)}function S(A){return A===null||st(A)?h(A):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),C(A))}function C(A){return A===null||st(A)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),h(A)):A===96&&A===a?n(A):(t.consume(A),C)}function w(A){return t.attempt(o,k,v)(A)}function v(A){return t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),b}function b(A){return l>0&&xt(A)?Et(t,_,"linePrefix",l+1)(A):_(A)}function _(A){return A===null||st(A)?t.check(Zb,w,k)(A):(t.enter("codeFlowValue"),x(A))}function x(A){return A===null||st(A)?(t.exit("codeFlowValue"),_(A)):(t.consume(A),x)}function k(A){return t.exit("codeFenced"),e(A)}function N(A,M,R){let j=0;return O;function O(K){return A.enter("lineEnding"),A.consume(K),A.exit("lineEnding"),B}function B(K){return A.enter("codeFencedFence"),xt(K)?Et(A,q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):q(K)}function q(K){return K===a?(A.enter("codeFencedFenceSequence"),$(K)):R(K)}function $(K){return K===a?(j++,A.consume(K),$):j>=u?(A.exit("codeFencedFenceSequence"),xt(K)?Et(A,V,"whitespace")(K):V(K)):R(K)}function V(K){return K===null||st(K)?(A.exit("codeFencedFence"),M(K)):R(K)}}}function t9(t,e,n){const i=this;return o;function o(u){return u===null?n(u):(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),l)}function l(u){return i.parser.lazy[i.now().line]?n(u):e(u)}}const cg={name:"codeIndented",tokenize:r9},n9={partial:!0,tokenize:i9};function r9(t,e,n){const i=this;return o;function o(f){return t.enter("codeIndented"),Et(t,l,"linePrefix",5)(f)}function l(f){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):st(f)?t.attempt(n9,u,d)(f):(t.enter("codeFlowValue"),a(f))}function a(f){return f===null||st(f)?(t.exit("codeFlowValue"),u(f)):(t.consume(f),a)}function d(f){return t.exit("codeIndented"),e(f)}}function i9(t,e,n){const i=this;return o;function o(u){return i.parser.lazy[i.now().line]?n(u):st(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),o):Et(t,l,"linePrefix",5)(u)}function l(u){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(u):st(u)?o(u):n(u)}}const s9={name:"codeText",previous:a9,resolve:o9,tokenize:l9};function o9(t){let e=t.length-4,n=3,i,o;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i<e;)if(t[i][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(i=n-1,e++;++i<=e;)o===void 0?i!==e&&t[i][1].type!=="lineEnding"&&(o=i):(i===e||t[i][1].type==="lineEnding")&&(t[o][1].type="codeTextData",i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),e-=i-o-2,i=o+2),o=void 0);return t}function a9(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function l9(t,e,n){let i=0,o,l;return u;function u(h){return t.enter("codeText"),t.enter("codeTextSequence"),a(h)}function a(h){return h===96?(t.consume(h),i++,a):(t.exit("codeTextSequence"),d(h))}function d(h){return h===null?n(h):h===32?(t.enter("space"),t.consume(h),t.exit("space"),d):h===96?(l=t.enter("codeTextSequence"),o=0,p(h)):st(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),d):(t.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||st(h)?(t.exit("codeTextData"),d(h)):(t.consume(h),f)}function p(h){return h===96?(t.consume(h),o++,p):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(h)):(l.type="codeTextData",f(h))}}class c9{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const i=n==null?Number.POSITIVE_INFINITY:n;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const o=n||0;this.setCursor(Math.trunc(e));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&Su(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Su(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Su(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);Su(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Su(this.left,n.reverse())}}}function Su(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function u3(t){const e={};let n=-1,i,o,l,u,a,d,f;const p=new c9(t);for(;++n<p.length;){for(;n in e;)n=e[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,u9(p,n)),n=e[n],f=!0);else if(i[1]._container){for(l=n,o=void 0;l--;)if(u=p.get(l),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=l);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},a=p.slice(o,n),a.unshift(i),p.splice(o,n-o+1,a))}}return Fr(t,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function u9(t,e){const n=t.get(e)[1],i=t.get(e)[2];let o=e-1;const l=[];let u=n._tokenizer;u||(u=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const a=u.events,d=[],f={};let p,h,y=-1,S=n,C=0,w=0;const v=[w];for(;S;){for(;t.get(++o)[1]!==S;);l.push(o),S._tokenizer||(p=i.sliceStream(S),S.next||p.push(null),h&&u.defineSkip(S.start),S._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),S._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),h=S,S=S.next}for(S=n;++y<a.length;)a[y][0]==="exit"&&a[y-1][0]==="enter"&&a[y][1].type===a[y-1][1].type&&a[y][1].start.line!==a[y][1].end.line&&(w=y+1,v.push(w),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(u.events=[],S?(S._tokenizer=void 0,S.previous=void 0):v.pop(),y=v.length;y--;){const b=a.slice(v[y],v[y+1]),_=l.pop();d.push([_,_+b.length-1]),t.splice(_,2,b)}for(d.reverse(),y=-1;++y<d.length;)f[C+d[y][0]]=C+d[y][1],C+=d[y][1]-d[y][0]-1;return f}const d9={resolve:h9,tokenize:p9},f9={partial:!0,tokenize:m9};function h9(t){return u3(t),t}function p9(t,e){let n;return i;function i(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?l(a):st(a)?t.check(f9,u,l)(a):(t.consume(a),o)}function l(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function u(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function m9(t,e,n){const i=this;return o;function o(u){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Et(t,l,"linePrefix")}function l(u){if(u===null||st(u))return n(u);const a=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(u):t.interrupt(i.parser.constructs.flow,n,e)(u)}}function d3(t,e,n,i,o,l,u,a,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return h;function h(b){return b===60?(t.enter(i),t.enter(o),t.enter(l),t.consume(b),t.exit(l),y):b===null||b===32||b===41||Zf(b)?n(b):(t.enter(i),t.enter(u),t.enter(a),t.enter("chunkString",{contentType:"string"}),w(b))}function y(b){return b===62?(t.enter(l),t.consume(b),t.exit(l),t.exit(o),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),S(b))}function S(b){return b===62?(t.exit("chunkString"),t.exit(a),y(b)):b===null||b===60||st(b)?n(b):(t.consume(b),b===92?C:S)}function C(b){return b===60||b===62||b===92?(t.consume(b),S):S(b)}function w(b){return!p&&(b===null||b===41||Ut(b))?(t.exit("chunkString"),t.exit(a),t.exit(u),t.exit(i),e(b)):p<f&&b===40?(t.consume(b),p++,w):b===41?(t.consume(b),p--,w):b===null||b===32||b===40||Zf(b)?n(b):(t.consume(b),b===92?v:w)}function v(b){return b===40||b===41||b===92?(t.consume(b),w):w(b)}}function f3(t,e,n,i,o,l){const u=this;let a=0,d;return f;function f(S){return t.enter(i),t.enter(o),t.consume(S),t.exit(o),t.enter(l),p}function p(S){return a>999||S===null||S===91||S===93&&!d||S===94&&!a&&"_hiddenFootnoteSupport"in u.parser.constructs?n(S):S===93?(t.exit(l),t.enter(o),t.consume(S),t.exit(o),t.exit(i),e):st(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),p):(t.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||S===91||S===93||st(S)||a++>999?(t.exit("chunkString"),p(S)):(t.consume(S),d||(d=!xt(S)),S===92?y:h)}function y(S){return S===91||S===92||S===93?(t.consume(S),a++,h):h(S)}}function h3(t,e,n,i,o,l){let u;return a;function a(y){return y===34||y===39||y===40?(t.enter(i),t.enter(o),t.consume(y),t.exit(o),u=y===40?41:y,d):n(y)}function d(y){return y===u?(t.enter(o),t.consume(y),t.exit(o),t.exit(i),e):(t.enter(l),f(y))}function f(y){return y===u?(t.exit(l),d(u)):y===null?n(y):st(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),Et(t,f,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===u||y===null||st(y)?(t.exit("chunkString"),f(y)):(t.consume(y),y===92?h:p)}function h(y){return y===u||y===92?(t.consume(y),p):p(y)}}function Mu(t,e){let n;return i;function i(o){return st(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),n=!0,i):xt(o)?Et(t,i,n?"linePrefix":"lineSuffix")(o):e(o)}}const g9={name:"definition",tokenize:_9},v9={partial:!0,tokenize:y9};function _9(t,e,n){const i=this;let o;return l;function l(S){return t.enter("definition"),u(S)}function u(S){return f3.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function a(S){return o=Ei(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),d):n(S)}function d(S){return Ut(S)?Mu(t,f)(S):f(S)}function f(S){return d3(t,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function p(S){return t.attempt(v9,h,h)(S)}function h(S){return xt(S)?Et(t,y,"whitespace")(S):y(S)}function y(S){return S===null||st(S)?(t.exit("definition"),i.parser.defined.push(o),e(S)):n(S)}}function y9(t,e,n){return i;function i(a){return Ut(a)?Mu(t,o)(a):n(a)}function o(a){return h3(t,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return xt(a)?Et(t,u,"whitespace")(a):u(a)}function u(a){return a===null||st(a)?e(a):n(a)}}const b9={name:"hardBreakEscape",tokenize:x9};function x9(t,e,n){return i;function i(l){return t.enter("hardBreakEscape"),t.consume(l),o}function o(l){return st(l)?(t.exit("hardBreakEscape"),e(l)):n(l)}}const S9={name:"headingAtx",resolve:w9,tokenize:C9};function w9(t,e){let n=t.length-2,i=3,o,l;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},l={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},Fr(t,i,n-i+1,[["enter",o,e],["enter",l,e],["exit",l,e],["exit",o,e]])),t}function C9(t,e,n){let i=0;return o;function o(p){return t.enter("atxHeading"),l(p)}function l(p){return t.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&i++<6?(t.consume(p),u):p===null||Ut(p)?(t.exit("atxHeadingSequence"),a(p)):n(p)}function a(p){return p===35?(t.enter("atxHeadingSequence"),d(p)):p===null||st(p)?(t.exit("atxHeading"),e(p)):xt(p)?Et(t,a,"whitespace")(p):(t.enter("atxHeadingText"),f(p))}function d(p){return p===35?(t.consume(p),d):(t.exit("atxHeadingSequence"),a(p))}function f(p){return p===null||p===35||Ut(p)?(t.exit("atxHeadingText"),a(p)):(t.consume(p),f)}}const k9=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ex=["pre","script","style","textarea"],E9={concrete:!0,name:"htmlFlow",resolveTo:T9,tokenize:N9},A9={partial:!0,tokenize:M9},R9={partial:!0,tokenize:D9};function T9(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function N9(t,e,n){const i=this;let o,l,u,a,d;return f;function f(F){return p(F)}function p(F){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(F),h}function h(F){return F===33?(t.consume(F),y):F===47?(t.consume(F),l=!0,w):F===63?(t.consume(F),o=3,i.interrupt?e:L):sr(F)?(t.consume(F),u=String.fromCharCode(F),v):n(F)}function y(F){return F===45?(t.consume(F),o=2,S):F===91?(t.consume(F),o=5,a=0,C):sr(F)?(t.consume(F),o=4,i.interrupt?e:L):n(F)}function S(F){return F===45?(t.consume(F),i.interrupt?e:L):n(F)}function C(F){const J="CDATA[";return F===J.charCodeAt(a++)?(t.consume(F),a===J.length?i.interrupt?e:q:C):n(F)}function w(F){return sr(F)?(t.consume(F),u=String.fromCharCode(F),v):n(F)}function v(F){if(F===null||F===47||F===62||Ut(F)){const J=F===47,ne=u.toLowerCase();return!J&&!l&&ex.includes(ne)?(o=1,i.interrupt?e(F):q(F)):k9.includes(u.toLowerCase())?(o=6,J?(t.consume(F),b):i.interrupt?e(F):q(F)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(F):l?_(F):x(F))}return F===45||Yn(F)?(t.consume(F),u+=String.fromCharCode(F),v):n(F)}function b(F){return F===62?(t.consume(F),i.interrupt?e:q):n(F)}function _(F){return xt(F)?(t.consume(F),_):O(F)}function x(F){return F===47?(t.consume(F),O):F===58||F===95||sr(F)?(t.consume(F),k):xt(F)?(t.consume(F),x):O(F)}function k(F){return F===45||F===46||F===58||F===95||Yn(F)?(t.consume(F),k):N(F)}function N(F){return F===61?(t.consume(F),A):xt(F)?(t.consume(F),N):x(F)}function A(F){return F===null||F===60||F===61||F===62||F===96?n(F):F===34||F===39?(t.consume(F),d=F,M):xt(F)?(t.consume(F),A):R(F)}function M(F){return F===d?(t.consume(F),d=null,j):F===null||st(F)?n(F):(t.consume(F),M)}function R(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||Ut(F)?N(F):(t.consume(F),R)}function j(F){return F===47||F===62||xt(F)?x(F):n(F)}function O(F){return F===62?(t.consume(F),B):n(F)}function B(F){return F===null||st(F)?q(F):xt(F)?(t.consume(F),B):n(F)}function q(F){return F===45&&o===2?(t.consume(F),G):F===60&&o===1?(t.consume(F),Y):F===62&&o===4?(t.consume(F),z):F===63&&o===3?(t.consume(F),L):F===93&&o===5?(t.consume(F),I):st(F)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(A9,H,$)(F)):F===null||st(F)?(t.exit("htmlFlowData"),$(F)):(t.consume(F),q)}function $(F){return t.check(R9,V,H)(F)}function V(F){return t.enter("lineEnding"),t.consume(F),t.exit("lineEnding"),K}function K(F){return F===null||st(F)?$(F):(t.enter("htmlFlowData"),q(F))}function G(F){return F===45?(t.consume(F),L):q(F)}function Y(F){return F===47?(t.consume(F),u="",Q):q(F)}function Q(F){if(F===62){const J=u.toLowerCase();return ex.includes(J)?(t.consume(F),z):q(F)}return sr(F)&&u.length<8?(t.consume(F),u+=String.fromCharCode(F),Q):q(F)}function I(F){return F===93?(t.consume(F),L):q(F)}function L(F){return F===62?(t.consume(F),z):F===45&&o===2?(t.consume(F),L):q(F)}function z(F){return F===null||st(F)?(t.exit("htmlFlowData"),H(F)):(t.consume(F),z)}function H(F){return t.exit("htmlFlow"),e(F)}}function D9(t,e,n){const i=this;return o;function o(u){return st(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),l):n(u)}function l(u){return i.parser.lazy[i.now().line]?n(u):e(u)}}function M9(t,e,n){return i;function i(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(fd,e,n)}}const j9={name:"htmlText",tokenize:O9};function O9(t,e,n){const i=this;let o,l,u;return a;function a(L){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(L),d}function d(L){return L===33?(t.consume(L),f):L===47?(t.consume(L),N):L===63?(t.consume(L),x):sr(L)?(t.consume(L),R):n(L)}function f(L){return L===45?(t.consume(L),p):L===91?(t.consume(L),l=0,C):sr(L)?(t.consume(L),_):n(L)}function p(L){return L===45?(t.consume(L),S):n(L)}function h(L){return L===null?n(L):L===45?(t.consume(L),y):st(L)?(u=h,Y(L)):(t.consume(L),h)}function y(L){return L===45?(t.consume(L),S):h(L)}function S(L){return L===62?G(L):L===45?y(L):h(L)}function C(L){const z="CDATA[";return L===z.charCodeAt(l++)?(t.consume(L),l===z.length?w:C):n(L)}function w(L){return L===null?n(L):L===93?(t.consume(L),v):st(L)?(u=w,Y(L)):(t.consume(L),w)}function v(L){return L===93?(t.consume(L),b):w(L)}function b(L){return L===62?G(L):L===93?(t.consume(L),b):w(L)}function _(L){return L===null||L===62?G(L):st(L)?(u=_,Y(L)):(t.consume(L),_)}function x(L){return L===null?n(L):L===63?(t.consume(L),k):st(L)?(u=x,Y(L)):(t.consume(L),x)}function k(L){return L===62?G(L):x(L)}function N(L){return sr(L)?(t.consume(L),A):n(L)}function A(L){return L===45||Yn(L)?(t.consume(L),A):M(L)}function M(L){return st(L)?(u=M,Y(L)):xt(L)?(t.consume(L),M):G(L)}function R(L){return L===45||Yn(L)?(t.consume(L),R):L===47||L===62||Ut(L)?j(L):n(L)}function j(L){return L===47?(t.consume(L),G):L===58||L===95||sr(L)?(t.consume(L),O):st(L)?(u=j,Y(L)):xt(L)?(t.consume(L),j):G(L)}function O(L){return L===45||L===46||L===58||L===95||Yn(L)?(t.consume(L),O):B(L)}function B(L){return L===61?(t.consume(L),q):st(L)?(u=B,Y(L)):xt(L)?(t.consume(L),B):j(L)}function q(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),o=L,$):st(L)?(u=q,Y(L)):xt(L)?(t.consume(L),q):(t.consume(L),V)}function $(L){return L===o?(t.consume(L),o=void 0,K):L===null?n(L):st(L)?(u=$,Y(L)):(t.consume(L),$)}function V(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Ut(L)?j(L):(t.consume(L),V)}function K(L){return L===47||L===62||Ut(L)?j(L):n(L)}function G(L){return L===62?(t.consume(L),t.exit("htmlTextData"),t.exit("htmlText"),e):n(L)}function Y(L){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),Q}function Q(L){return xt(L)?Et(t,I,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):I(L)}function I(L){return t.enter("htmlTextData"),u(L)}}const uv={name:"labelEnd",resolveAll:z9,resolveTo:P9,tokenize:F9},L9={tokenize:H9},I9={tokenize:U9},B9={tokenize:$9};function z9(t){let e=-1;const n=[];for(;++e<t.length;){const i=t[e][1];if(n.push(t[e]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",e+=o}}return t.length!==n.length&&Fr(t,0,t.length,n),t}function P9(t,e){let n=t.length,i=0,o,l,u,a;for(;n--;)if(o=t[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(t[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:t[l][1].type==="labelLink"?"link":"image",start:{...t[l][1].start},end:{...t[t.length-1][1].end}},f={type:"label",start:{...t[l][1].start},end:{...t[u][1].end}},p={type:"labelText",start:{...t[l+i+2][1].end},end:{...t[u-2][1].start}};return a=[["enter",d,e],["enter",f,e]],a=ri(a,t.slice(l+1,l+i+3)),a=ri(a,[["enter",p,e]]),a=ri(a,qh(e.parser.constructs.insideSpan.null,t.slice(l+i+4,u-3),e)),a=ri(a,[["exit",p,e],t[u-2],t[u-1],["exit",f,e]]),a=ri(a,t.slice(u+1)),a=ri(a,[["exit",d,e]]),Fr(t,l,t.length,a),t}function F9(t,e,n){const i=this;let o=i.events.length,l,u;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){l=i.events[o][1];break}return a;function a(y){return l?l._inactive?h(y):(u=i.parser.defined.includes(Ei(i.sliceSerialize({start:l.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(y),t.exit("labelMarker"),t.exit("labelEnd"),d):n(y)}function d(y){return y===40?t.attempt(L9,p,u?p:h)(y):y===91?t.attempt(I9,p,u?f:h)(y):u?p(y):h(y)}function f(y){return t.attempt(B9,p,h)(y)}function p(y){return e(y)}function h(y){return l._balanced=!0,n(y)}}function H9(t,e,n){return i;function i(h){return t.enter("resource"),t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),o}function o(h){return Ut(h)?Mu(t,l)(h):l(h)}function l(h){return h===41?p(h):d3(t,u,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function u(h){return Ut(h)?Mu(t,d)(h):p(h)}function a(h){return n(h)}function d(h){return h===34||h===39||h===40?h3(t,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):p(h)}function f(h){return Ut(h)?Mu(t,p)(h):p(h)}function p(h){return h===41?(t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),t.exit("resource"),e):n(h)}}function U9(t,e,n){const i=this;return o;function o(a){return f3.call(i,t,l,u,"reference","referenceMarker","referenceString")(a)}function l(a){return i.parser.defined.includes(Ei(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function u(a){return n(a)}}function $9(t,e,n){return i;function i(l){return t.enter("reference"),t.enter("referenceMarker"),t.consume(l),t.exit("referenceMarker"),o}function o(l){return l===93?(t.enter("referenceMarker"),t.consume(l),t.exit("referenceMarker"),t.exit("reference"),e):n(l)}}const q9={name:"labelStartImage",resolveAll:uv.resolveAll,tokenize:V9};function V9(t,e,n){const i=this;return o;function o(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),l}function l(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),u):n(a)}function u(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):e(a)}}const W9={name:"labelStartLink",resolveAll:uv.resolveAll,tokenize:G9};function G9(t,e,n){const i=this;return o;function o(u){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelLink"),l}function l(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):e(u)}}const ug={name:"lineEnding",tokenize:K9};function K9(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),Et(t,e,"linePrefix")}}const jf={name:"thematicBreak",tokenize:Y9};function Y9(t,e,n){let i=0,o;return l;function l(f){return t.enter("thematicBreak"),u(f)}function u(f){return o=f,a(f)}function a(f){return f===o?(t.enter("thematicBreakSequence"),d(f)):i>=3&&(f===null||st(f))?(t.exit("thematicBreak"),e(f)):n(f)}function d(f){return f===o?(t.consume(f),i++,d):(t.exit("thematicBreakSequence"),xt(f)?Et(t,a,"whitespace")(f):a(f))}}const vr={continuation:{tokenize:J9},exit:tI,name:"list",tokenize:Z9},X9={partial:!0,tokenize:nI},Q9={partial:!0,tokenize:eI};function Z9(t,e,n){const i=this,o=i.events[i.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return a;function a(S){const C=i.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!i.containerState.marker||S===i.containerState.marker:Qg(S)){if(i.containerState.type||(i.containerState.type=C,t.enter(C,{_container:!0})),C==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(jf,n,f)(S):f(S);if(!i.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),d(S)}return n(S)}function d(S){return Qg(S)&&++u<10?(t.consume(S),d):(!i.interrupt||u<2)&&(i.containerState.marker?S===i.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),f(S)):n(S)}function f(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||S,t.check(fd,i.interrupt?n:p,t.attempt(X9,y,h))}function p(S){return i.containerState.initialBlankLine=!0,l++,y(S)}function h(S){return xt(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),y):n(S)}function y(S){return i.containerState.size=l+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(S)}}function J9(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(fd,o,l);function o(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Et(t,e,"listItemIndent",i.containerState.size+1)(a)}function l(a){return i.containerState.furtherBlankLines||!xt(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(Q9,e,u)(a))}function u(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,Et(t,t.attempt(vr,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function eI(t,e,n){const i=this;return Et(t,o,"listItemIndent",i.containerState.size+1);function o(l){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?e(l):n(l)}}function tI(t){t.exit(this.containerState.type)}function nI(t,e,n){const i=this;return Et(t,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const u=i.events[i.events.length-1];return!xt(l)&&u&&u[1].type==="listItemPrefixWhitespace"?e(l):n(l)}}const tx={name:"setextUnderline",resolveTo:rI,tokenize:iI};function rI(t,e){let n=t.length,i,o,l;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(o=n)}else t[n][1].type==="content"&&t.splice(n,1),!l&&t[n][1].type==="definition"&&(l=n);const u={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",l?(t.splice(o,0,["enter",u,e]),t.splice(l+1,0,["exit",t[i][1],e]),t[i][1].end={...t[l][1].end}):t[i][1]=u,t.push(["exit",u,e]),t}function iI(t,e,n){const i=this;let o;return l;function l(f){let p=i.events.length,h;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){h=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||h)?(t.enter("setextHeadingLine"),o=f,u(f)):n(f)}function u(f){return t.enter("setextHeadingLineSequence"),a(f)}function a(f){return f===o?(t.consume(f),a):(t.exit("setextHeadingLineSequence"),xt(f)?Et(t,d,"lineSuffix")(f):d(f))}function d(f){return f===null||st(f)?(t.exit("setextHeadingLine"),e(f)):n(f)}}const sI={tokenize:oI};function oI(t){const e=this,n=t.attempt(fd,i,t.attempt(this.parser.constructs.flowInitial,o,Et(t,t.attempt(this.parser.constructs.flow,o,t.attempt(d9,o)),"linePrefix")));return n;function i(l){if(l===null){t.consume(l);return}return t.enter("lineEndingBlank"),t.consume(l),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function o(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const aI={resolveAll:m3()},lI=p3("string"),cI=p3("text");function p3(t){return{resolveAll:m3(t==="text"?uI:void 0),tokenize:e};function e(n){const i=this,o=this.parser.constructs[t],l=n.attempt(o,u,a);return u;function u(p){return f(p)?l(p):a(p)}function a(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),l(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const h=o[p];let y=-1;if(h)for(;++y<h.length;){const S=h[y];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function m3(t){return e;function e(n,i){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return t?t(n,i):n}}function uI(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const i=t[n-1][1],o=e.sliceStream(i);let l=o.length,u=-1,a=0,d;for(;l--;){const f=o[l];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)a++,u--;if(u)break;u=-1}else if(f===-2)d=!0,a++;else if(f!==-1){l++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){const f={type:n===t.length||d||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?u:i.start._bufferIndex+u,_index:i.start._index+l,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(t.splice(n,0,["enter",f,e],["exit",f,e]),n+=2)}n++}return t}const dI={42:vr,43:vr,45:vr,48:vr,49:vr,50:vr,51:vr,52:vr,53:vr,54:vr,55:vr,56:vr,57:vr,62:a3},fI={91:g9},hI={[-2]:cg,[-1]:cg,32:cg},pI={35:S9,42:jf,45:[tx,jf],60:E9,61:tx,95:jf,96:Jb,126:Jb},mI={38:c3,92:l3},gI={[-5]:ug,[-4]:ug,[-3]:ug,33:q9,38:c3,42:Zg,60:[WL,j9],91:W9,92:[b9,l3],93:uv,95:Zg,96:s9},vI={null:[Zg,aI]},_I={null:[42,95]},yI={null:[]},bI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_I,contentInitial:fI,disable:yI,document:dI,flow:pI,flowInitial:hI,insideSpan:vI,string:mI,text:gI},Symbol.toStringTag,{value:"Module"}));function xI(t,e,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let u=[],a=[];const d={attempt:M(N),check:M(A),consume:_,enter:x,exit:k,interrupt:M(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:C,parser:t,previous:null,sliceSerialize:y,sliceStream:S,write:h};let p=e.tokenize.call(f,d);return e.resolveAll&&l.push(e),f;function h(B){return u=ri(u,B),v(),u[u.length-1]!==null?[]:(R(e,0),f.events=qh(l,f.events,f),f.events)}function y(B,q){return wI(S(B),q)}function S(B){return SI(u,B)}function C(){const{_bufferIndex:B,_index:q,line:$,column:V,offset:K}=i;return{_bufferIndex:B,_index:q,line:$,column:V,offset:K}}function w(B){o[B.line]=B.column,O()}function v(){let B;for(;i._index<u.length;){const q=u[i._index];if(typeof q=="string")for(B=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===B&&i._bufferIndex<q.length;)b(q.charCodeAt(i._bufferIndex));else b(q)}}function b(B){p=p(B)}function _(B){st(B)?(i.line++,i.column=1,i.offset+=B===-3?2:1,O()):B!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===u[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=B}function x(B,q){const $=q||{};return $.type=B,$.start=C(),f.events.push(["enter",$,f]),a.push($),$}function k(B){const q=a.pop();return q.end=C(),f.events.push(["exit",q,f]),q}function N(B,q){R(B,q.from)}function A(B,q){q.restore()}function M(B,q){return $;function $(V,K,G){let Y,Q,I,L;return Array.isArray(V)?H(V):"tokenize"in V?H([V]):z(V);function z(Z){return W;function W(U){const te=U!==null&&Z[U],ie=U!==null&&Z.null,ae=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return H(ae)(U)}}function H(Z){return Y=Z,Q=0,Z.length===0?G:F(Z[Q])}function F(Z){return W;function W(U){return L=j(),I=Z,Z.partial||(f.currentConstruct=Z),Z.name&&f.parser.constructs.disable.null.includes(Z.name)?ne():Z.tokenize.call(q?Object.assign(Object.create(f),q):f,d,J,ne)(U)}}function J(Z){return B(I,L),K}function ne(Z){return L.restore(),++Q<Y.length?F(Y[Q]):G}}}function R(B,q){B.resolveAll&&!l.includes(B)&&l.push(B),B.resolve&&Fr(f.events,q,f.events.length-q,B.resolve(f.events.slice(q),f)),B.resolveTo&&(f.events=B.resolveTo(f.events,f))}function j(){const B=C(),q=f.previous,$=f.currentConstruct,V=f.events.length,K=Array.from(a);return{from:V,restore:G};function G(){i=B,f.previous=q,f.currentConstruct=$,f.events.length=V,a=K,O()}}function O(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function SI(t,e){const n=e.start._index,i=e.start._bufferIndex,o=e.end._index,l=e.end._bufferIndex;let u;if(n===o)u=[t[n].slice(i,l)];else{if(u=t.slice(n,o),i>-1){const a=u[0];typeof a=="string"?u[0]=a.slice(i):u.shift()}l>0&&u.push(t[o].slice(0,l))}return u}function wI(t,e){let n=-1;const i=[];let o;for(;++n<t.length;){const l=t[n];let u;if(typeof l=="string")u=l;else switch(l){case-5:{u="\r";break}case-4:{u=`
|
|
537
|
+
`;break}case-3:{u=`\r
|
|
538
|
+
`;break}case-2:{u=e?" ":" ";break}case-1:{if(!e&&o)continue;u=" ";break}default:u=String.fromCharCode(l)}o=l===-2,i.push(u)}return i.join("")}function CI(t){const i={constructs:s3([bI,...(t||{}).extensions||[]]),content:o(PL),defined:[],document:o(HL),flow:o(sI),lazy:{},string:o(lI),text:o(cI)};return i;function o(l){return u;function u(a){return xI(i,l,a)}}}function kI(t){for(;!u3(t););return t}const nx=/[\0\t\n\r]/g;function EI(){let t=1,e="",n=!0,i;return o;function o(l,u,a){const d=[];let f,p,h,y,S;for(l=e+(typeof l=="string"?l.toString():new TextDecoder(u||void 0).decode(l)),h=0,e="",n&&(l.charCodeAt(0)===65279&&h++,n=void 0);h<l.length;){if(nx.lastIndex=h,f=nx.exec(l),y=f&&f.index!==void 0?f.index:l.length,S=l.charCodeAt(y),!f){e=l.slice(h);break}if(S===10&&h===y&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),h<y&&(d.push(l.slice(h,y)),t+=y-h),S){case 0:{d.push(65533),t++;break}case 9:{for(p=Math.ceil(t/4)*4,d.push(-2);t++<p;)d.push(-1);break}case 10:{d.push(-4),t=1;break}default:i=!0,t=1}h=y+1}return a&&(i&&d.push(-5),e&&d.push(e),d.push(null)),d}}const AI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RI(t){return t.replace(AI,TI)}function TI(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return o3(n.slice(l?2:1),l?16:10)}return cv(n)||t}const g3={}.hasOwnProperty;function NI(t,e,n){return e&&typeof e=="object"&&(n=e,e=void 0),DI(n)(kI(CI(n).document().write(EI()(t,e,!0))))}function DI(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Je),autolinkProtocol:j,autolinkEmail:j,atxHeading:l(De),blockQuote:l(ie),characterEscape:j,characterReference:j,codeFenced:l(ae),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(ae,u),codeText:l(se,u),codeTextData:j,data:j,codeFlowValue:j,definition:l(_e),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(Te),hardBreakEscape:l(Ke),hardBreakTrailing:l(Ke),htmlFlow:l(Ae,u),htmlFlowData:j,htmlText:l(Ae,u),htmlTextData:j,image:l(rt),label:u,link:l(Je),listItem:l(ot),listItemValue:y,listOrdered:l(Qe,h),listUnordered:l(Qe),paragraph:l(ue),reference:F,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(De),strong:l(it),thematicBreak:l(dt)},exit:{atxHeading:d(),atxHeadingSequence:N,autolink:d(),autolinkEmail:te,autolinkProtocol:U,blockQuote:d(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:Z,characterReference:W,codeFenced:d(v),codeFencedFence:w,codeFencedFenceInfo:S,codeFencedFenceMeta:C,codeFlowValue:O,codeIndented:d(b),codeText:d(K),codeTextData:O,data:O,definition:d(),definitionDestinationString:k,definitionLabelString:_,definitionTitleString:x,emphasis:d(),hardBreakEscape:d(q),hardBreakTrailing:d(q),htmlFlow:d($),htmlFlowData:O,htmlText:d(V),htmlTextData:O,image:d(Y),label:I,labelText:Q,lineEnding:B,link:d(G),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:J,resourceDestinationString:L,resourceTitleString:z,resource:H,setextHeading:d(R),setextHeadingLineSequence:M,setextHeadingText:A,strong:d(),thematicBreak:d()}};v3(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(ce){let xe={type:"root",children:[]};const pe={stack:[xe],tokenStack:[],config:e,enter:a,exit:f,buffer:u,resume:p,data:n},Me=[];let Le=-1;for(;++Le<ce.length;)if(ce[Le][1].type==="listOrdered"||ce[Le][1].type==="listUnordered")if(ce[Le][0]==="enter")Me.push(Le);else{const nt=Me.pop();Le=o(ce,nt,Le)}for(Le=-1;++Le<ce.length;){const nt=e[ce[Le][0]];g3.call(nt,ce[Le][1].type)&&nt[ce[Le][1].type].call(Object.assign({sliceSerialize:ce[Le][2].sliceSerialize},pe),ce[Le][1])}if(pe.tokenStack.length>0){const nt=pe.tokenStack[pe.tokenStack.length-1];(nt[1]||rx).call(pe,void 0,nt[0])}for(xe.position={start:Co(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:Co(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<e.transforms.length;)xe=e.transforms[Le](xe)||xe;return xe}function o(ce,xe,pe){let Me=xe-1,Le=-1,nt=!1,je,Ve,ct,Tt;for(;++Me<=pe;){const be=ce[Me];switch(be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{be[0]==="enter"?Le++:Le--,Tt=void 0;break}case"lineEndingBlank":{be[0]==="enter"&&(je&&!Tt&&!Le&&!ct&&(ct=Me),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!Le&&be[0]==="enter"&&be[1].type==="listItemPrefix"||Le===-1&&be[0]==="exit"&&(be[1].type==="listUnordered"||be[1].type==="listOrdered")){if(je){let et=Me;for(Ve=void 0;et--;){const at=ce[et];if(at[1].type==="lineEnding"||at[1].type==="lineEndingBlank"){if(at[0]==="exit")continue;Ve&&(ce[Ve][1].type="lineEndingBlank",nt=!0),at[1].type="lineEnding",Ve=et}else if(!(at[1].type==="linePrefix"||at[1].type==="blockQuotePrefix"||at[1].type==="blockQuotePrefixWhitespace"||at[1].type==="blockQuoteMarker"||at[1].type==="listItemIndent"))break}ct&&(!Ve||ct<Ve)&&(je._spread=!0),je.end=Object.assign({},Ve?ce[Ve][1].start:be[1].end),ce.splice(Ve||Me,0,["exit",je,be[2]]),Me++,pe++}if(be[1].type==="listItemPrefix"){const et={type:"listItem",_spread:!1,start:Object.assign({},be[1].start),end:void 0};je=et,ce.splice(Me,0,["enter",et,be[2]]),Me++,pe++,ct=void 0,Tt=!0}}}return ce[xe][1]._spread=nt,pe}function l(ce,xe){return pe;function pe(Me){a.call(this,ce(Me),Me),xe&&xe.call(this,Me)}}function u(){this.stack.push({type:"fragment",children:[]})}function a(ce,xe,pe){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([xe,pe||void 0]),ce.position={start:Co(xe.start),end:void 0}}function d(ce){return xe;function xe(pe){ce&&ce.call(this,pe),f.call(this,pe)}}function f(ce,xe){const pe=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==ce.type&&(xe?xe.call(this,ce,Me[0]):(Me[1]||rx).call(this,ce,Me[0]));else throw new Error("Cannot close `"+ce.type+"` ("+Du({start:ce.start,end:ce.end})+"): it’s not open");pe.position.end=Co(ce.end)}function p(){return lv(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function y(ce){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function S(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=ce}function C(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=ce}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce.replace(/(\r?\n|\r)$/g,"")}function _(ce){const xe=this.resume(),pe=this.stack[this.stack.length-1];pe.label=xe,pe.identifier=Ei(this.sliceSerialize(ce)).toLowerCase()}function x(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ce}function k(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ce}function N(ce){const xe=this.stack[this.stack.length-1];if(!xe.depth){const pe=this.sliceSerialize(ce).length;xe.depth=pe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function M(ce){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function j(ce){const pe=this.stack[this.stack.length-1].children;let Me=pe[pe.length-1];(!Me||Me.type!=="text")&&(Me=Ze(),Me.position={start:Co(ce.start),end:void 0},pe.push(Me)),this.stack.push(Me)}function O(ce){const xe=this.stack.pop();xe.value+=this.sliceSerialize(ce),xe.position.end=Co(ce.end)}function B(ce){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const pe=xe.children[xe.children.length-1];pe.position.end=Co(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(xe.type)&&(j.call(this,ce),O.call(this,ce))}function q(){this.data.atHardBreak=!0}function $(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce}function V(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce}function K(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ce}function G(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=xe,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function Y(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=xe,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function Q(ce){const xe=this.sliceSerialize(ce),pe=this.stack[this.stack.length-2];pe.label=RI(xe),pe.identifier=Ei(xe).toLowerCase()}function I(){const ce=this.stack[this.stack.length-1],xe=this.resume(),pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,pe.type==="link"){const Me=ce.children;pe.children=Me}else pe.alt=xe}function L(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ce}function z(){const ce=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ce}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function J(ce){const xe=this.resume(),pe=this.stack[this.stack.length-1];pe.label=xe,pe.identifier=Ei(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function ne(ce){this.data.characterReferenceType=ce.type}function Z(ce){const xe=this.sliceSerialize(ce),pe=this.data.characterReferenceType;let Me;pe?(Me=o3(xe,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=cv(xe);const Le=this.stack[this.stack.length-1];Le.value+=Me}function W(ce){const xe=this.stack.pop();xe.position.end=Co(ce.end)}function U(ce){O.call(this,ce);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(ce)}function te(ce){O.call(this,ce);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(ce)}function ie(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function _e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Te(){return{type:"emphasis",children:[]}}function De(){return{type:"heading",depth:0,children:[]}}function Ke(){return{type:"break"}}function Ae(){return{type:"html",value:""}}function rt(){return{type:"image",title:null,url:"",alt:null}}function Je(){return{type:"link",title:null,url:"",children:[]}}function Qe(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function ot(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function ue(){return{type:"paragraph",children:[]}}function it(){return{type:"strong",children:[]}}function Ze(){return{type:"text",value:""}}function dt(){return{type:"thematicBreak"}}}function Co(t){return{line:t.line,column:t.column,offset:t.offset}}function v3(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?v3(t,i):MI(t,i)}}function MI(t,e){let n;for(n in e)if(g3.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function rx(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Du({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Du({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Du({start:e.start,end:e.end})+") is still open")}function jI(t){const e=this;e.parser=n;function n(i){return NI(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function OI(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function LI(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
|
|
539
|
+
`}]}function II(t,e){const n=e.value?e.value+`
|
|
540
|
+
`:"",i={},o=e.lang?e.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return e.meta&&(l.data={meta:e.meta}),t.patch(e,l),l=t.applyData(e,l),l={type:"element",tagName:"pre",properties:{},children:[l]},t.patch(e,l),l}function BI(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function zI(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function PI(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),o=xc(i.toLowerCase()),l=t.footnoteOrder.indexOf(i);let u,a=t.footnoteCounts.get(i);a===void 0?(a=0,t.footnoteOrder.push(i),u=t.footnoteOrder.length):u=l+1,a+=1,t.footnoteCounts.set(i,a);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};t.patch(e,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return t.patch(e,f),t.applyData(e,f)}function FI(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function HI(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function _3(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const o=t.all(e),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=i:o.push({type:"text",value:i}),o}function UI(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return _3(t,e);const o={src:xc(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"img",properties:o,children:[]};return t.patch(e,l),t.applyData(e,l)}function $I(t,e){const n={src:xc(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function qI(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function VI(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return _3(t,e);const o={href:xc(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"a",properties:o,children:t.all(e)};return t.patch(e,l),t.applyData(e,l)}function WI(t,e){const n={href:xc(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function GI(t,e,n){const i=t.all(e),o=n?KI(n):y3(e),l={},u=[];if(typeof e.checked=="boolean"){const p=i[0];let h;p&&p.type==="element"&&p.tagName==="p"?h=p:(h={type:"element",tagName:"p",properties:{},children:[]},i.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<i.length;){const p=i[a];(o||a!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
541
|
+
`}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=i[i.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
542
|
+
`});const f={type:"element",tagName:"li",properties:l,children:u};return t.patch(e,f),t.applyData(e,f)}function KI(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let i=-1;for(;!e&&++i<n.length;)e=y3(n[i])}return e}function y3(t){const e=t.spread;return e==null?t.children.length>1:e}function YI(t,e){const n={},i=t.all(e);let o=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++o<i.length;){const u=i[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(i,!0)};return t.patch(e,l),t.applyData(e,l)}function XI(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function QI(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function ZI(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function JI(t,e){const n=t.all(e),i=n.shift(),o=[];if(i){const u={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(e.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=iv(e.children[1]),d=ZC(e.children[e.children.length-1]);a&&d&&(u.position={start:a,end:d}),o.push(u)}const l={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(e,l),t.applyData(e,l)}function eB(t,e,n){const i=n?n.children:void 0,l=(i?i.indexOf(e):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,a=u?u.length:e.children.length;let d=-1;const f=[];for(;++d<a;){const h=e.children[d],y={},S=u?u[d]:void 0;S&&(y.align=S);let C={type:"element",tagName:l,properties:y,children:[]};h&&(C.children=t.all(h),t.patch(h,C),C=t.applyData(h,C)),f.push(C)}const p={type:"element",tagName:"tr",properties:{},children:t.wrap(f,!0)};return t.patch(e,p),t.applyData(e,p)}function tB(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const ix=9,sx=32;function nB(t){const e=String(t),n=/\r?\n|\r/g;let i=n.exec(e),o=0;const l=[];for(;i;)l.push(ox(e.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(e);return l.push(ox(e.slice(o),o>0,!1)),l.join("")}function ox(t,e,n){let i=0,o=t.length;if(e){let l=t.codePointAt(i);for(;l===ix||l===sx;)i++,l=t.codePointAt(i)}if(n){let l=t.codePointAt(o-1);for(;l===ix||l===sx;)o--,l=t.codePointAt(o-1)}return o>i?t.slice(i,o):""}function rB(t,e){const n={type:"text",value:nB(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function iB(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const sB={blockquote:OI,break:LI,code:II,delete:BI,emphasis:zI,footnoteReference:PI,heading:FI,html:HI,imageReference:UI,image:$I,inlineCode:qI,linkReference:VI,link:WI,listItem:GI,list:YI,paragraph:XI,root:QI,strong:ZI,table:JI,tableCell:tB,tableRow:eB,text:rB,thematicBreak:iB,toml:wf,yaml:wf,definition:wf,footnoteDefinition:wf};function wf(){}const b3=-1,Vh=0,ju=1,Jf=2,dv=3,fv=4,hv=5,pv=6,x3=7,S3=8,ax=typeof self=="object"?self:globalThis,oB=(t,e)=>{const n=(o,l)=>(t.set(l,o),o),i=o=>{if(t.has(o))return t.get(o);const[l,u]=e[o];switch(l){case Vh:case b3:return n(u,o);case ju:{const a=n([],o);for(const d of u)a.push(i(d));return a}case Jf:{const a=n({},o);for(const[d,f]of u)a[i(d)]=i(f);return a}case dv:return n(new Date(u),o);case fv:{const{source:a,flags:d}=u;return n(new RegExp(a,d),o)}case hv:{const a=n(new Map,o);for(const[d,f]of u)a.set(i(d),i(f));return a}case pv:{const a=n(new Set,o);for(const d of u)a.add(i(d));return a}case x3:{const{name:a,message:d}=u;return n(new ax[a](d),o)}case S3:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:a}=new Uint8Array(u);return n(new DataView(a),u)}}return n(new ax[l](u),o)};return i},lx=t=>oB(new Map,t)(0),Ul="",{toString:aB}={},{keys:lB}=Object,wu=t=>{const e=typeof t;if(e!=="object"||!t)return[Vh,e];const n=aB.call(t).slice(8,-1);switch(n){case"Array":return[ju,Ul];case"Object":return[Jf,Ul];case"Date":return[dv,Ul];case"RegExp":return[fv,Ul];case"Map":return[hv,Ul];case"Set":return[pv,Ul];case"DataView":return[ju,n]}return n.includes("Array")?[ju,n]:n.includes("Error")?[x3,n]:[Jf,n]},Cf=([t,e])=>t===Vh&&(e==="function"||e==="symbol"),cB=(t,e,n,i)=>{const o=(u,a)=>{const d=i.push(u)-1;return n.set(a,d),d},l=u=>{if(n.has(u))return n.get(u);let[a,d]=wu(u);switch(a){case Vh:{let p=u;switch(d){case"bigint":a=S3,p=u.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([b3],u)}return o([a,p],u)}case ju:{if(d){let y=u;return d==="DataView"?y=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(u)),o([d,[...y]],u)}const p=[],h=o([a,p],u);for(const y of u)p.push(l(y));return h}case Jf:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(e&&"toJSON"in u)return l(u.toJSON());const p=[],h=o([a,p],u);for(const y of lB(u))(t||!Cf(wu(u[y])))&&p.push([l(y),l(u[y])]);return h}case dv:return o([a,u.toISOString()],u);case fv:{const{source:p,flags:h}=u;return o([a,{source:p,flags:h}],u)}case hv:{const p=[],h=o([a,p],u);for(const[y,S]of u)(t||!(Cf(wu(y))||Cf(wu(S))))&&p.push([l(y),l(S)]);return h}case pv:{const p=[],h=o([a,p],u);for(const y of u)(t||!Cf(wu(y)))&&p.push(l(y));return h}}const{message:f}=u;return o([a,{name:d,message:f}],u)};return l},cx=(t,{json:e,lossy:n}={})=>{const i=[];return cB(!(e||n),!!e,new Map,i)(t),i},eh=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?lx(cx(t,e)):structuredClone(t):(t,e)=>lx(cx(t,e));function uB(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function dB(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function fB(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||uB,i=t.options.footnoteBackLabel||dB,o=t.options.footnoteLabel||"Footnotes",l=t.options.footnoteLabelTagName||"h2",u=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let d=-1;for(;++d<t.footnoteOrder.length;){const f=t.footnoteById.get(t.footnoteOrder[d]);if(!f)continue;const p=t.all(f),h=String(f.identifier).toUpperCase(),y=xc(h.toLowerCase());let S=0;const C=[],w=t.footnoteCounts.get(h);for(;w!==void 0&&++S<=w;){C.length>0&&C.push({type:"text",value:" "});let _=typeof n=="string"?n:n(d,S);typeof _=="string"&&(_={type:"text",value:_}),C.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+y+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,S),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const _=v.children[v.children.length-1];_&&_.type==="text"?_.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...C)}else p.push(...C);const b={type:"element",tagName:"li",properties:{id:e+"fn-"+y},children:t.wrap(p,!0)};t.patch(f,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...eh(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
543
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:`
|
|
544
|
+
`}]}}const Wh=(function(t){if(t==null)return gB;if(typeof t=="function")return Gh(t);if(typeof t=="object")return Array.isArray(t)?hB(t):pB(t);if(typeof t=="string")return mB(t);throw new Error("Expected function, string, or object as test")});function hB(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Wh(t[n]);return Gh(i);function i(...o){let l=-1;for(;++l<e.length;)if(e[l].apply(this,o))return!0;return!1}}function pB(t){const e=t;return Gh(n);function n(i){const o=i;let l;for(l in t)if(o[l]!==e[l])return!1;return!0}}function mB(t){return Gh(e);function e(n){return n&&n.type===t}}function Gh(t){return e;function e(n,i,o){return!!(vB(n)&&t.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function gB(){return!0}function vB(t){return t!==null&&typeof t=="object"&&"type"in t}const w3=[],_B=!0,Jg=!1,yB="skip";function C3(t,e,n,i){let o;typeof e=="function"&&typeof n!="function"?(i=n,n=e):o=e;const l=Wh(o),u=i?-1:1;a(t,void 0,[])();function a(d,f,p){const h=d&&typeof d=="object"?d:{};if(typeof h.type=="string"){const S=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(d.type+(S?"<"+S+">":""))+")"})}return y;function y(){let S=w3,C,w,v;if((!e||l(d,f,p[p.length-1]||void 0))&&(S=bB(n(d,p)),S[0]===Jg))return S;if("children"in d&&d.children){const b=d;if(b.children&&S[0]!==yB)for(w=(i?b.children.length:-1)+u,v=p.concat(b);w>-1&&w<b.children.length;){const _=b.children[w];if(C=a(_,w,v)(),C[0]===Jg)return C;w=typeof C[1]=="number"?C[1]:w+u}}return S}}}function bB(t){return Array.isArray(t)?t:typeof t=="number"?[_B,t]:t==null?w3:[t]}function mv(t,e,n,i){let o,l,u;typeof e=="function"&&typeof n!="function"?(l=void 0,u=e,o=n):(l=e,u=n,o=i),C3(t,l,a,o);function a(d,f){const p=f[f.length-1],h=p?p.children.indexOf(d):void 0;return u(d,h,p)}}const e1={}.hasOwnProperty,xB={};function SB(t,e){const n=e||xB,i=new Map,o=new Map,l=new Map,u={...sB,...n.handlers},a={all:f,applyData:CB,definitionById:i,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:u,one:d,options:n,patch:wB,wrap:EB};return mv(t,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const h=p.type==="definition"?i:o,y=String(p.identifier).toUpperCase();h.has(y)||h.set(y,p)}}),a;function d(p,h){const y=p.type,S=a.handlers[y];if(e1.call(a.handlers,y)&&S)return S(a,p,h);if(a.options.passThrough&&a.options.passThrough.includes(y)){if("children"in p){const{children:w,...v}=p,b=eh(v);return b.children=a.all(p),b}return eh(p)}return(a.options.unknownHandler||kB)(a,p,h)}function f(p){const h=[];if("children"in p){const y=p.children;let S=-1;for(;++S<y.length;){const C=a.one(y[S],p);if(C){if(S&&y[S-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=ux(C.value)),!Array.isArray(C)&&C.type==="element")){const w=C.children[0];w&&w.type==="text"&&(w.value=ux(w.value))}Array.isArray(C)?h.push(...C):h.push(C)}}}return h}}function wB(t,e){t.position&&(e.position=dL(t))}function CB(t,e){let n=e;if(t&&t.data){const i=t.data.hName,o=t.data.hChildren,l=t.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const u="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:u}}n.type==="element"&&l&&Object.assign(n.properties,eh(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function kB(t,e){const n=e.data||{},i="value"in e&&!(e1.call(n,"hProperties")||e1.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function EB(t,e){const n=[];let i=-1;for(e&&n.push({type:"text",value:`
|
|
545
|
+
`});++i<t.length;)i&&n.push({type:"text",value:`
|
|
546
|
+
`}),n.push(t[i]);return e&&t.length>0&&n.push({type:"text",value:`
|
|
547
|
+
`}),n}function ux(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function dx(t,e){const n=SB(t,e),i=n.one(t,void 0),o=fB(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
|
|
548
|
+
`},o),l}function AB(t,e){return t&&"run"in t?async function(n,i){const o=dx(n,{file:i,...e});await t.run(o,i)}:function(n,i){return dx(n,{file:i,...t||e})}}function fx(t){if(t)throw t}var dg,hx;function RB(){if(hx)return dg;hx=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):e.call(f)==="[object Array]"},l=function(f){if(!f||e.call(f)!=="[object Object]")return!1;var p=t.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&t.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!h)return!1;var y;for(y in f);return typeof y>"u"||t.call(f,y)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},a=function(f,p){if(p==="__proto__")if(t.call(f,p)){if(i)return i(f,p).value}else return;return f[p]};return dg=function d(){var f,p,h,y,S,C,w=arguments[0],v=1,b=arguments.length,_=!1;for(typeof w=="boolean"&&(_=w,w=arguments[1]||{},v=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});v<b;++v)if(f=arguments[v],f!=null)for(p in f)h=a(w,p),y=a(f,p),w!==y&&(_&&y&&(l(y)||(S=o(y)))?(S?(S=!1,C=h&&o(h)?h:[]):C=h&&l(h)?h:{},u(w,{name:p,newValue:d(_,C,y)})):typeof y<"u"&&u(w,{name:p,newValue:y}));return w},dg}var TB=RB();const fg=nh(TB);function t1(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function NB(){const t=[],e={run:n,use:i};return e;function n(...o){let l=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);a(null,...o);function a(d,...f){const p=t[++l];let h=-1;if(d){u(d);return}for(;++h<o.length;)(f[h]===null||f[h]===void 0)&&(f[h]=o[h]);o=f,p?DB(p,a)(...f):u(null,...f)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),e}}function DB(t,e){let n;return i;function i(...u){const a=t.length>u.length;let d;a&&u.push(o);try{d=t.apply(this,u)}catch(f){const p=f;if(a&&n)throw p;return o(p)}a||(d&&d.then&&typeof d.then=="function"?d.then(l,o):d instanceof Error?o(d):l(d))}function o(u,...a){n||(n=!0,e(u,...a))}function l(u){o(null,u)}}const Vi={basename:MB,dirname:jB,extname:OB,join:LB,sep:"/"};function MB(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');hd(t);let n=0,i=-1,o=t.length,l;if(e===void 0||e.length===0||e.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(l){n=o+1;break}}else i<0&&(l=!0,i=o+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let u=-1,a=e.length-1;for(;o--;)if(t.codePointAt(o)===47){if(l){n=o+1;break}}else u<0&&(l=!0,u=o+1),a>-1&&(t.codePointAt(o)===e.codePointAt(a--)?a<0&&(i=o):(a=-1,i=u));return n===i?i=u:i<0&&(i=t.length),t.slice(n,i)}function jB(t){if(hd(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function OB(t){hd(t);let e=t.length,n=-1,i=0,o=-1,l=0,u;for(;e--;){const a=t.codePointAt(e);if(a===47){if(u){i=e+1;break}continue}n<0&&(u=!0,n=e+1),a===46?o<0?o=e:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===i+1?"":t.slice(o,n)}function LB(...t){let e=-1,n;for(;++e<t.length;)hd(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":IB(n)}function IB(t){hd(t);const e=t.codePointAt(0)===47;let n=BB(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function BB(t,e){let n="",i=0,o=-1,l=0,u=-1,a,d;for(;++u<=t.length;){if(u<t.length)a=t.codePointAt(u);else{if(a===47)break;a=47}if(a===47){if(!(o===u-1||l===1))if(o!==u-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),o=u,l=0;continue}}else if(n.length>0){n="",i=0,o=u,l=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(o+1,u):n=t.slice(o+1,u),i=u-o-1;o=u,l=0}else a===46&&l>-1?l++:l=-1}return n}function hd(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const zB={cwd:PB};function PB(){return"/"}function n1(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function FB(t){if(typeof t=="string")t=new URL(t);else if(!n1(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return HB(t)}function HB(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const i=e.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(e)}const hg=["history","path","basename","stem","extname","dirname"];class k3{constructor(e){let n;e?n1(e)?n={path:e}:typeof e=="string"||UB(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":zB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<hg.length;){const l=hg[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)hg.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Vi.basename(this.path):void 0}set basename(e){mg(e,"basename"),pg(e,"basename"),this.path=Vi.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Vi.dirname(this.path):void 0}set dirname(e){px(this.basename,"dirname"),this.path=Vi.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Vi.extname(this.path):void 0}set extname(e){if(pg(e,"extname"),px(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vi.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){n1(e)&&(e=FB(e)),mg(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Vi.basename(this.path,this.extname):void 0}set stem(e){mg(e,"stem"),pg(e,"stem"),this.path=Vi.join(this.dirname||"",e+(this.extname||""))}fail(e,n,i){const o=this.message(e,n,i);throw o.fatal=!0,o}info(e,n,i){const o=this.message(e,n,i);return o.fatal=void 0,o}message(e,n,i){const o=new Xn(e,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function pg(t,e){if(t&&t.includes(Vi.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Vi.sep+"`")}function mg(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function px(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function UB(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const $B=(function(t){const i=this.constructor.prototype,o=i[t],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),qB={}.hasOwnProperty;class gv extends $B{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=NB()}copy(){const e=new gv;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(fg(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(_g("data",this.frozen),this.namespace[e]=n,this):qB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(_g("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(e,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=kf(e),i=this.parser||this.Parser;return gg("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),gg("process",this.parser||this.Parser),vg("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,u){const a=kf(e),d=i.parse(a);i.run(d,a,function(p,h,y){if(p||!h||!y)return f(p);const S=h,C=i.stringify(S,y);GB(C)?y.value=C:y.result=C,f(p,y)});function f(p,h){p||!h?u(p):l?l(h):n(void 0,h)}}}processSync(e){let n=!1,i;return this.freeze(),gg("processSync",this.parser||this.Parser),vg("processSync",this.compiler||this.Compiler),this.process(e,o),gx("processSync","process",n),i;function o(l,u){n=!0,fx(l),i=u}}run(e,n,i){mx(e),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(u,a){const d=kf(n);o.run(e,d,f);function f(p,h,y){const S=h||e;p?a(p):u?u(S):i(void 0,S,y)}}}runSync(e,n){let i=!1,o;return this.run(e,n,l),gx("runSync","run",i),o;function l(u,a){fx(u),o=a,i=!0}}stringify(e,n){this.freeze();const i=kf(n),o=this.compiler||this.Compiler;return vg("stringify",o),mx(e),o(e,i)}use(e,...n){const i=this.attachers,o=this.namespace;if(_g("use",this.frozen),e!=null)if(typeof e=="function")d(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):u(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function l(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...h]=f;d(p,h)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(f.plugins),f.settings&&(o.settings=fg(!0,o.settings,f.settings))}function a(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const h=f[p];l(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let h=-1,y=-1;for(;++h<i.length;)if(i[h][0]===f){y=h;break}if(y===-1)i.push([f,...p]);else if(p.length>0){let[S,...C]=p;const w=i[y][1];t1(w)&&t1(S)&&(S=fg(!0,w,S)),i[y]=[f,S,...C]}}}}const VB=new gv().freeze();function gg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function vg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function _g(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mx(t){if(!t1(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function gx(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function kf(t){return WB(t)?t:new k3(t)}function WB(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function GB(t){return typeof t=="string"||KB(t)}function KB(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const YB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vx=[],_x={allowDangerousHtml:!0},XB=/^(https?|ircs?|mailto|xmpp)$/i,QB=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ZB(t){const e=JB(t),n=ez(t);return tz(e.runSync(e.parse(n),n),t)}function JB(t){const e=t.rehypePlugins||vx,n=t.remarkPlugins||vx,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,..._x}:_x;return VB().use(jI).use(n).use(AB,i).use(e)}function ez(t){const e=t.children||"",n=new k3;return typeof e=="string"&&(n.value=e),n}function tz(t,e){const n=e.allowedElements,i=e.allowElement,o=e.components,l=e.disallowedElements,u=e.skipHtml,a=e.unwrapDisallowed,d=e.urlTransform||nz;for(const p of QB)Object.hasOwn(e,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+YB+p.id,void 0);return mv(t,f),gL(t,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(p,h,y){if(p.type==="raw"&&y&&typeof h=="number")return u?y.children.splice(h,1):y.children[h]={type:"text",value:p.value},h;if(p.type==="element"){let S;for(S in lg)if(Object.hasOwn(lg,S)&&Object.hasOwn(p.properties,S)){const C=p.properties[S],w=lg[S];(w===null||w.includes(p.tagName))&&(p.properties[S]=d(String(C||""),S,p))}}if(p.type==="element"){let S=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!S&&i&&typeof h=="number"&&(S=!i(p,h,y)),S&&y&&typeof h=="number")return a&&p.children?y.children.splice(h,1,...p.children):y.children.splice(h,1),h}}}function nz(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),o=t.indexOf("/");return e===-1||o!==-1&&e>o||n!==-1&&e>n||i!==-1&&e>i||XB.test(t.slice(0,e))?t:""}function yx(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(e);for(;o!==-1;)i++,o=n.indexOf(e,o+e.length);return i}function rz(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function iz(t,e,n){const o=Wh((n||{}).ignore||[]),l=sz(e);let u=-1;for(;++u<l.length;)C3(t,"text",a);function a(f,p){let h=-1,y;for(;++h<p.length;){const S=p[h],C=y?y.children:void 0;if(o(S,C?C.indexOf(S):void 0,y))return;y=S}if(y)return d(f,p)}function d(f,p){const h=p[p.length-1],y=l[u][0],S=l[u][1];let C=0;const v=h.children.indexOf(f);let b=!1,_=[];y.lastIndex=0;let x=y.exec(f.value);for(;x;){const k=x.index,N={index:x.index,input:x.input,stack:[...p,f]};let A=S(...x,N);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?y.lastIndex=k+1:(C!==k&&_.push({type:"text",value:f.value.slice(C,k)}),Array.isArray(A)?_.push(...A):A&&_.push(A),C=k+x[0].length,b=!0),!y.global)break;x=y.exec(f.value)}return b?(C<f.value.length&&_.push({type:"text",value:f.value.slice(C)}),h.children.splice(v,1,..._)):_=[f],v+_.length}}function sz(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<n.length;){const o=n[i];e.push([oz(o[0]),az(o[1])])}return e}function oz(t){return typeof t=="string"?new RegExp(rz(t),"g"):t}function az(t){return typeof t=="function"?t:function(){return t}}const yg="phrasing",bg=["autolink","link","image","label"];function lz(){return{transforms:[mz],enter:{literalAutolink:uz,literalAutolinkEmail:xg,literalAutolinkHttp:xg,literalAutolinkWww:xg},exit:{literalAutolink:pz,literalAutolinkEmail:hz,literalAutolinkHttp:dz,literalAutolinkWww:fz}}}function cz(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yg,notInConstruct:bg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yg,notInConstruct:bg},{character:":",before:"[ps]",after:"\\/",inConstruct:yg,notInConstruct:bg}]}}function uz(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function xg(t){this.config.enter.autolinkProtocol.call(this,t)}function dz(t){this.config.exit.autolinkProtocol.call(this,t)}function fz(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function hz(t){this.config.exit.autolinkEmail.call(this,t)}function pz(t){this.exit(t)}function mz(t){iz(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,gz],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),vz]],{ignore:["link","linkReference"]})}function gz(t,e,n,i,o){let l="";if(!E3(o)||(/^w/i.test(e)&&(n=e+n,e="",l="http://"),!_z(n)))return!1;const u=yz(n+i);if(!u[0])return!1;const a={type:"link",title:null,url:l+e+u[0],children:[{type:"text",value:e+u[0]}]};return u[1]?[a,{type:"text",value:u[1]}]:a}function vz(t,e,n,i){return!E3(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function _z(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function yz(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const o=yx(t,"(");let l=yx(t,")");for(;i!==-1&&o>l;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[t,n]}function E3(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Ia(n)||$h(n))&&(!e||n!==47)}A3.peek=Rz;function bz(){this.buffer()}function xz(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Sz(){this.buffer()}function wz(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Cz(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ei(this.sliceSerialize(t)).toLowerCase(),n.label=e}function kz(t){this.exit(t)}function Ez(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ei(this.sliceSerialize(t)).toLowerCase(),n.label=e}function Az(t){this.exit(t)}function Rz(){return"["}function A3(t,e,n,i){const o=n.createTracker(i);let l=o.move("[^");const u=n.enter("footnoteReference"),a=n.enter("reference");return l+=o.move(n.safe(n.associationId(t),{after:"]",before:l})),a(),u(),l+=o.move("]"),l}function Tz(){return{enter:{gfmFootnoteCallString:bz,gfmFootnoteCall:xz,gfmFootnoteDefinitionLabelString:Sz,gfmFootnoteDefinition:wz},exit:{gfmFootnoteCallString:Cz,gfmFootnoteCall:kz,gfmFootnoteDefinitionLabelString:Ez,gfmFootnoteDefinition:Az}}}function Nz(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:A3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,o,l,u){const a=l.createTracker(u);let d=a.move("[^");const f=l.enter("footnoteDefinition"),p=l.enter("label");return d+=a.move(l.safe(l.associationId(i),{before:d,after:"]"})),p(),d+=a.move("]:"),i.children&&i.children.length>0&&(a.shift(4),d+=a.move((e?`
|
|
549
|
+
`:" ")+l.indentLines(l.containerFlow(i,a.current()),e?R3:Dz))),f(),d}}function Dz(t,e,n){return e===0?t:R3(t,e,n)}function R3(t,e,n){return(n?"":" ")+t}const Mz=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];T3.peek=Bz;function jz(){return{canContainEols:["delete"],enter:{strikethrough:Lz},exit:{strikethrough:Iz}}}function Oz(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Mz}],handlers:{delete:T3}}}function Lz(t){this.enter({type:"delete",children:[]},t)}function Iz(t){this.exit(t)}function T3(t,e,n,i){const o=n.createTracker(i),l=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(t,{...o.current(),before:u,after:"~"}),u+=o.move("~~"),l(),u}function Bz(){return"~"}function zz(t){return t.length}function Pz(t,e){const n=e||{},i=(n.align||[]).concat(),o=n.stringLength||zz,l=[],u=[],a=[],d=[];let f=0,p=-1;for(;++p<t.length;){const w=[],v=[];let b=-1;for(t[p].length>f&&(f=t[p].length);++b<t[p].length;){const _=Fz(t[p][b]);if(n.alignDelimiters!==!1){const x=o(_);v[b]=x,(d[b]===void 0||x>d[b])&&(d[b]=x)}w.push(_)}u[p]=w,a[p]=v}let h=-1;if(typeof i=="object"&&"length"in i)for(;++h<f;)l[h]=bx(i[h]);else{const w=bx(i);for(;++h<f;)l[h]=w}h=-1;const y=[],S=[];for(;++h<f;){const w=l[h];let v="",b="";w===99?(v=":",b=":"):w===108?v=":":w===114&&(b=":");let _=n.alignDelimiters===!1?1:Math.max(1,d[h]-v.length-b.length);const x=v+"-".repeat(_)+b;n.alignDelimiters!==!1&&(_=v.length+_+b.length,_>d[h]&&(d[h]=_),S[h]=_),y[h]=x}u.splice(1,0,y),a.splice(1,0,S),p=-1;const C=[];for(;++p<u.length;){const w=u[p],v=a[p];h=-1;const b=[];for(;++h<f;){const _=w[h]||"";let x="",k="";if(n.alignDelimiters!==!1){const N=d[h]-(v[h]||0),A=l[h];A===114?x=" ".repeat(N):A===99?N%2?(x=" ".repeat(N/2+.5),k=" ".repeat(N/2-.5)):(x=" ".repeat(N/2),k=x):k=" ".repeat(N)}n.delimiterStart!==!1&&!h&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||h)&&b.push(" "),n.alignDelimiters!==!1&&b.push(x),b.push(_),n.alignDelimiters!==!1&&b.push(k),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||h!==f-1)&&b.push("|")}C.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return C.join(`
|
|
550
|
+
`)}function Fz(t){return t==null?"":String(t)}function bx(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function Hz(t,e,n,i){const o=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const u=n.indentLines(n.containerFlow(t,l.current()),Uz);return o(),u}function Uz(t,e,n){return">"+(n?"":" ")+t}function $z(t,e){return xx(t,e.inConstruct,!0)&&!xx(t,e.notInConstruct,!1)}function xx(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function Sx(t,e,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
551
|
+
`&&$z(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
552
|
+
`}function qz(t,e){const n=String(t);let i=n.indexOf(e),o=i,l=0,u=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++l>u&&(u=l):l=1,o=i+e.length,i=n.indexOf(e,o);return u}function Vz(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function Wz(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function Gz(t,e,n,i){const o=Wz(n),l=t.value||"",u=o==="`"?"GraveAccent":"Tilde";if(Vz(t,n)){const h=n.enter("codeIndented"),y=n.indentLines(l,Kz);return h(),y}const a=n.createTracker(i),d=o.repeat(Math.max(qz(l,o)+1,3)),f=n.enter("codeFenced");let p=a.move(d);if(t.lang){const h=n.enter(`codeFencedLang${u}`);p+=a.move(n.safe(t.lang,{before:p,after:" ",encode:["`"],...a.current()})),h()}if(t.lang&&t.meta){const h=n.enter(`codeFencedMeta${u}`);p+=a.move(" "),p+=a.move(n.safe(t.meta,{before:p,after:`
|
|
553
|
+
`,encode:["`"],...a.current()})),h()}return p+=a.move(`
|
|
554
|
+
`),l&&(p+=a.move(l+`
|
|
555
|
+
`)),p+=a.move(d),f(),p}function Kz(t,e,n){return(n?"":" ")+t}function vv(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function Yz(t,e,n,i){const o=vv(n),l=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let a=n.enter("label");const d=n.createTracker(i);let f=d.move("[");return f+=d.move(n.safe(n.associationId(t),{before:f,after:"]",...d.current()})),f+=d.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(t.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(a=n.enter("destinationRaw"),f+=d.move(n.safe(t.url,{before:f,after:t.title?" ":`
|
|
556
|
+
`,...d.current()}))),a(),t.title&&(a=n.enter(`title${l}`),f+=d.move(" "+o),f+=d.move(n.safe(t.title,{before:f,after:o,...d.current()})),f+=d.move(o),a()),u(),f}function Xz(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Wu(t){return"&#x"+t.toString(16).toUpperCase()+";"}function th(t,e,n){const i=ic(t),o=ic(e);return i===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}N3.peek=Qz;function N3(t,e,n,i){const o=Xz(n),l=n.enter("emphasis"),u=n.createTracker(i),a=u.move(o);let d=u.move(n.containerPhrasing(t,{after:o,before:a,...u.current()}));const f=d.charCodeAt(0),p=th(i.before.charCodeAt(i.before.length-1),f,o);p.inside&&(d=Wu(f)+d.slice(1));const h=d.charCodeAt(d.length-1),y=th(i.after.charCodeAt(0),h,o);y.inside&&(d=d.slice(0,-1)+Wu(h));const S=u.move(o);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},a+d+S}function Qz(t,e,n){return n.options.emphasis||"*"}function Zz(t,e){let n=!1;return mv(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Jg}),!!((!t.depth||t.depth<3)&&lv(t)&&(e.options.setext||n))}function Jz(t,e,n,i){const o=Math.max(Math.min(6,t.depth||1),1),l=n.createTracker(i);if(Zz(t,n)){const p=n.enter("headingSetext"),h=n.enter("phrasing"),y=n.containerPhrasing(t,{...l.current(),before:`
|
|
557
|
+
`,after:`
|
|
558
|
+
`});return h(),p(),y+`
|
|
559
|
+
`+(o===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
560
|
+
`))+1))}const u="#".repeat(o),a=n.enter("headingAtx"),d=n.enter("phrasing");l.move(u+" ");let f=n.containerPhrasing(t,{before:"# ",after:`
|
|
561
|
+
`,...l.current()});return/^[\t ]/.test(f)&&(f=Wu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),a(),f}D3.peek=eP;function D3(t){return t.value||""}function eP(){return"<"}M3.peek=tP;function M3(t,e,n,i){const o=vv(n),l=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let a=n.enter("label");const d=n.createTracker(i);let f=d.move("![");return f+=d.move(n.safe(t.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(t.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(a=n.enter("destinationRaw"),f+=d.move(n.safe(t.url,{before:f,after:t.title?" ":")",...d.current()}))),a(),t.title&&(a=n.enter(`title${l}`),f+=d.move(" "+o),f+=d.move(n.safe(t.title,{before:f,after:o,...d.current()})),f+=d.move(o),a()),f+=d.move(")"),u(),f}function tP(){return"!"}j3.peek=nP;function j3(t,e,n,i){const o=t.referenceType,l=n.enter("imageReference");let u=n.enter("label");const a=n.createTracker(i);let d=a.move("![");const f=n.safe(t.alt,{before:d,after:"]",...a.current()});d+=a.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const h=n.safe(n.associationId(t),{before:d,after:"]",...a.current()});return u(),n.stack=p,l(),o==="full"||!f||f!==h?d+=a.move(h+"]"):o==="shortcut"?d=d.slice(0,-1):d+=a.move("]"),d}function nP(){return"!"}O3.peek=rP;function O3(t,e,n){let i=t.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const u=n.unsafe[l],a=n.compilePattern(u);let d;if(u.atBreak)for(;d=a.exec(i);){let f=d.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(d.index+1)}}return o+i+o}function rP(){return"`"}function L3(t,e){const n=lv(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}I3.peek=iP;function I3(t,e,n,i){const o=vv(n),l=o==='"'?"Quote":"Apostrophe",u=n.createTracker(i);let a,d;if(L3(t,n)){const p=n.stack;n.stack=[],a=n.enter("autolink");let h=u.move("<");return h+=u.move(n.containerPhrasing(t,{before:h,after:">",...u.current()})),h+=u.move(">"),a(),n.stack=p,h}a=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(t,{before:f,after:"](",...u.current()})),f+=u.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(t.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(t.url,{before:f,after:t.title?" ":")",...u.current()}))),d(),t.title&&(d=n.enter(`title${l}`),f+=u.move(" "+o),f+=u.move(n.safe(t.title,{before:f,after:o,...u.current()})),f+=u.move(o),d()),f+=u.move(")"),a(),f}function iP(t,e,n){return L3(t,n)?"<":"["}B3.peek=sP;function B3(t,e,n,i){const o=t.referenceType,l=n.enter("linkReference");let u=n.enter("label");const a=n.createTracker(i);let d=a.move("[");const f=n.containerPhrasing(t,{before:d,after:"]",...a.current()});d+=a.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const h=n.safe(n.associationId(t),{before:d,after:"]",...a.current()});return u(),n.stack=p,l(),o==="full"||!f||f!==h?d+=a.move(h+"]"):o==="shortcut"?d=d.slice(0,-1):d+=a.move("]"),d}function sP(){return"["}function _v(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function oP(t){const e=_v(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function aP(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function z3(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function lP(t,e,n,i){const o=n.enter("list"),l=n.bulletCurrent;let u=t.ordered?aP(n):_v(n);const a=t.ordered?u==="."?")":".":oP(n);let d=e&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!t.ordered){const p=t.children?t.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),z3(n)===u&&p){let h=-1;for(;++h<t.children.length;){const y=t.children[h];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=a),n.bulletCurrent=u;const f=n.containerFlow(t,i);return n.bulletLastUsed=u,n.bulletCurrent=l,o(),f}function cP(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function uP(t,e,n,i){const o=cP(n);let l=n.bulletCurrent||_v(n);e&&e.type==="list"&&e.ordered&&(l=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+l);let u=l.length+1;(o==="tab"||o==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(u=Math.ceil(u/4)*4);const a=n.createTracker(i);a.move(l+" ".repeat(u-l.length)),a.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(t,a.current()),p);return d(),f;function p(h,y,S){return y?(S?"":" ".repeat(u))+h:(S?l:l+" ".repeat(u-l.length))+h}}function dP(t,e,n,i){const o=n.enter("paragraph"),l=n.enter("phrasing"),u=n.containerPhrasing(t,i);return l(),o(),u}const fP=Wh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function hP(t,e,n,i){return(t.children.some(function(u){return fP(u)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function pP(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}P3.peek=mP;function P3(t,e,n,i){const o=pP(n),l=n.enter("strong"),u=n.createTracker(i),a=u.move(o+o);let d=u.move(n.containerPhrasing(t,{after:o,before:a,...u.current()}));const f=d.charCodeAt(0),p=th(i.before.charCodeAt(i.before.length-1),f,o);p.inside&&(d=Wu(f)+d.slice(1));const h=d.charCodeAt(d.length-1),y=th(i.after.charCodeAt(0),h,o);y.inside&&(d=d.slice(0,-1)+Wu(h));const S=u.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},a+d+S}function mP(t,e,n){return n.options.strong||"*"}function gP(t,e,n,i){return n.safe(t.value,i)}function vP(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function _P(t,e,n){const i=(z3(n)+(n.options.ruleSpaces?" ":"")).repeat(vP(n));return n.options.ruleSpaces?i.slice(0,-1):i}const F3={blockquote:Hz,break:Sx,code:Gz,definition:Yz,emphasis:N3,hardBreak:Sx,heading:Jz,html:D3,image:M3,imageReference:j3,inlineCode:O3,link:I3,linkReference:B3,list:lP,listItem:uP,paragraph:dP,root:hP,strong:P3,text:gP,thematicBreak:_P};function yP(){return{enter:{table:bP,tableData:wx,tableHeader:wx,tableRow:SP},exit:{codeText:wP,table:xP,tableData:Sg,tableHeader:Sg,tableRow:Sg}}}function bP(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function xP(t){this.exit(t),this.data.inTable=void 0}function SP(t){this.enter({type:"tableRow",children:[]},t)}function Sg(t){this.exit(t)}function wx(t){this.enter({type:"tableCell",children:[]},t)}function wP(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,CP));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function CP(t,e){return e==="|"?e:t}function kP(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,o=e.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
562
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:u,tableCell:d,tableRow:a}};function u(S,C,w,v){return f(p(S,w,v),S.align)}function a(S,C,w,v){const b=h(S,w,v),_=f([b]);return _.slice(0,_.indexOf(`
|
|
563
|
+
`))}function d(S,C,w,v){const b=w.enter("tableCell"),_=w.enter("phrasing"),x=w.containerPhrasing(S,{...v,before:l,after:l});return _(),b(),x}function f(S,C){return Pz(S,{align:C,alignDelimiters:i,padding:n,stringLength:o})}function p(S,C,w){const v=S.children;let b=-1;const _=[],x=C.enter("table");for(;++b<v.length;)_[b]=h(v[b],C,w);return x(),_}function h(S,C,w){const v=S.children;let b=-1;const _=[],x=C.enter("tableRow");for(;++b<v.length;)_[b]=d(v[b],S,C,w);return x(),_}function y(S,C,w){let v=F3.inlineCode(S,C,w);return w.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function EP(){return{exit:{taskListCheckValueChecked:Cx,taskListCheckValueUnchecked:Cx,paragraph:RP}}}function AP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:TP}}}function Cx(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function RP(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const o=e.children;let l=-1,u;for(;++l<o.length;){const a=o[l];if(a.type==="paragraph"){u=a;break}}u===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function TP(t,e,n,i){const o=t.children[0],l=typeof t.checked=="boolean"&&o&&o.type==="paragraph",u="["+(t.checked?"x":" ")+"] ",a=n.createTracker(i);l&&a.move(u);let d=F3.listItem(t,e,n,{...i,...a.current()});return l&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function NP(){return[lz(),Tz(),jz(),yP(),EP()]}function DP(t){return{extensions:[cz(),Nz(t),Oz(),kP(t),AP()]}}const MP={tokenize:zP,partial:!0},H3={tokenize:PP,partial:!0},U3={tokenize:FP,partial:!0},$3={tokenize:HP,partial:!0},jP={tokenize:UP,partial:!0},q3={name:"wwwAutolink",tokenize:IP,previous:W3},V3={name:"protocolAutolink",tokenize:BP,previous:G3},Bs={name:"emailAutolink",tokenize:LP,previous:K3},Zi={};function OP(){return{text:Zi}}let Ra=48;for(;Ra<123;)Zi[Ra]=Bs,Ra++,Ra===58?Ra=65:Ra===91&&(Ra=97);Zi[43]=Bs;Zi[45]=Bs;Zi[46]=Bs;Zi[95]=Bs;Zi[72]=[Bs,V3];Zi[104]=[Bs,V3];Zi[87]=[Bs,q3];Zi[119]=[Bs,q3];function LP(t,e,n){const i=this;let o,l;return u;function u(h){return!r1(h)||!K3.call(i,i.previous)||yv(i.events)?n(h):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(h))}function a(h){return r1(h)?(t.consume(h),a):h===64?(t.consume(h),d):n(h)}function d(h){return h===46?t.check(jP,p,f)(h):h===45||h===95||Yn(h)?(l=!0,t.consume(h),d):p(h)}function f(h){return t.consume(h),o=!0,d}function p(h){return l&&o&&sr(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(h)):n(h)}}function IP(t,e,n){const i=this;return o;function o(u){return u!==87&&u!==119||!W3.call(i,i.previous)||yv(i.events)?n(u):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(MP,t.attempt(H3,t.attempt(U3,l),n),n)(u))}function l(u){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(u)}}function BP(t,e,n){const i=this;let o="",l=!1;return u;function u(h){return(h===72||h===104)&&G3.call(i,i.previous)&&!yv(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(h),t.consume(h),a):n(h)}function a(h){if(sr(h)&&o.length<5)return o+=String.fromCodePoint(h),t.consume(h),a;if(h===58){const y=o.toLowerCase();if(y==="http"||y==="https")return t.consume(h),d}return n(h)}function d(h){return h===47?(t.consume(h),l?f:(l=!0,d)):n(h)}function f(h){return h===null||Zf(h)||Ut(h)||Ia(h)||$h(h)?n(h):t.attempt(H3,t.attempt(U3,p),n)(h)}function p(h){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(h)}}function zP(t,e,n){let i=0;return o;function o(u){return(u===87||u===119)&&i<3?(i++,t.consume(u),o):u===46&&i===3?(t.consume(u),l):n(u)}function l(u){return u===null?n(u):e(u)}}function PP(t,e,n){let i,o,l;return u;function u(f){return f===46||f===95?t.check($3,d,a)(f):f===null||Ut(f)||Ia(f)||f!==45&&$h(f)?d(f):(l=!0,t.consume(f),u)}function a(f){return f===95?i=!0:(o=i,i=void 0),t.consume(f),u}function d(f){return o||i||!l?n(f):e(f)}}function FP(t,e){let n=0,i=0;return o;function o(u){return u===40?(n++,t.consume(u),o):u===41&&i<n?l(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?t.check($3,e,l)(u):u===null||Ut(u)||Ia(u)?e(u):(t.consume(u),o)}function l(u){return u===41&&i++,t.consume(u),o}}function HP(t,e,n){return i;function i(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),i):a===38?(t.consume(a),l):a===93?(t.consume(a),o):a===60||a===null||Ut(a)||Ia(a)?e(a):n(a)}function o(a){return a===null||a===40||a===91||Ut(a)||Ia(a)?e(a):i(a)}function l(a){return sr(a)?u(a):n(a)}function u(a){return a===59?(t.consume(a),i):sr(a)?(t.consume(a),u):n(a)}}function UP(t,e,n){return i;function i(l){return t.consume(l),o}function o(l){return Yn(l)?n(l):e(l)}}function W3(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ut(t)}function G3(t){return!sr(t)}function K3(t){return!(t===47||r1(t))}function r1(t){return t===43||t===45||t===46||t===95||Yn(t)}function yv(t){let e=t.length,n=!1;for(;e--;){const i=t[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const $P={tokenize:QP,partial:!0};function qP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:KP,continuation:{tokenize:YP},exit:XP}},text:{91:{name:"gfmFootnoteCall",tokenize:GP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:VP,resolveTo:WP}}}}function VP(t,e,n){const i=this;let o=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u;for(;o--;){const d=i.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return a;function a(d){if(!u||!u._balanced)return n(d);const f=Ei(i.sliceSerialize({start:u.end,end:i.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?n(d):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),e(d))}}function WP(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",o,e],["exit",o,e],["enter",l,e],["enter",u,e],["exit",u,e],["exit",l,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...a),t}function GP(t,e,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,u;return a;function a(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),d}function d(h){return h!==94?n(h):(t.enter("gfmFootnoteCallMarker"),t.consume(h),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",f)}function f(h){if(l>999||h===93&&!u||h===null||h===91||Ut(h))return n(h);if(h===93){t.exit("chunkString");const y=t.exit("gfmFootnoteCallString");return o.includes(Ei(i.sliceSerialize(y)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(h)}return Ut(h)||(u=!0),l++,t.consume(h),h===92?p:f}function p(h){return h===91||h===92||h===93?(t.consume(h),l++,f):f(h)}}function KP(t,e,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,u=0,a;return d;function d(C){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(C){return C===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",p):n(C)}function p(C){if(u>999||C===93&&!a||C===null||C===91||Ut(C))return n(C);if(C===93){t.exit("chunkString");const w=t.exit("gfmFootnoteDefinitionLabelString");return l=Ei(i.sliceSerialize(w)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),y}return Ut(C)||(a=!0),u++,t.consume(C),C===92?h:p}function h(C){return C===91||C===92||C===93?(t.consume(C),u++,p):p(C)}function y(C){return C===58?(t.enter("definitionMarker"),t.consume(C),t.exit("definitionMarker"),o.includes(l)||o.push(l),Et(t,S,"gfmFootnoteDefinitionWhitespace")):n(C)}function S(C){return e(C)}}function YP(t,e,n){return t.check(fd,e,t.attempt($P,e,n))}function XP(t){t.exit("gfmFootnoteDefinition")}function QP(t,e,n){const i=this;return Et(t,o,"gfmFootnoteDefinitionIndent",5);function o(l){const u=i.events[i.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?e(l):n(l)}}function ZP(t){let n=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(u,a){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},h={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},y=[["enter",p,a],["enter",u[f][1],a],["exit",u[f][1],a],["enter",h,a]],S=a.parser.constructs.insideSpan.null;S&&Fr(y,y.length,0,qh(S,u.slice(f+1,d),a)),Fr(y,y.length,0,[["exit",h,a],["enter",u[d][1],a],["exit",u[d][1],a],["exit",p,a]]),Fr(u,f-1,d-f+3,y),d=f+y.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function l(u,a,d){const f=this.previous,p=this.events;let h=0;return y;function y(C){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(C):(u.enter("strikethroughSequenceTemporary"),S(C))}function S(C){const w=ic(f);if(C===126)return h>1?d(C):(u.consume(C),h++,S);if(h<2&&!n)return d(C);const v=u.exit("strikethroughSequenceTemporary"),b=ic(C);return v._open=!b||b===2&&!!w,v._close=!w||w===2&&!!b,a(C)}}}class JP{constructor(){this.map=[]}add(e,n,i){eF(this,e,n,i)}consume(e){if(this.map.sort(function(l,u){return l[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push(e.slice()),e.length=0;let o=i.pop();for(;o;){for(const l of o)e.push(l);o=i.pop()}this.map.length=0}}function eF(t,e,n,i){let o=0;if(!(n===0&&i.length===0)){for(;o<t.map.length;){if(t.map[o][0]===e){t.map[o][1]+=n,t.map[o][2].push(...i);return}o+=1}t.map.push([e,n,i])}}function tF(t,e){let n=!1;const i=[];for(;e<t.length;){const o=t[e];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return i}function nF(){return{flow:{null:{name:"table",tokenize:rF,resolveAll:iF}}}}function rF(t,e,n){const i=this;let o=0,l=0,u;return a;function a(O){let B=i.events.length-1;for(;B>-1;){const V=i.events[B][1].type;if(V==="lineEnding"||V==="linePrefix")B--;else break}const q=B>-1?i.events[B][1].type:null,$=q==="tableHead"||q==="tableRow"?A:d;return $===A&&i.parser.lazy[i.now().line]?n(O):$(O)}function d(O){return t.enter("tableHead"),t.enter("tableRow"),f(O)}function f(O){return O===124||(u=!0,l+=1),p(O)}function p(O){return O===null?n(O):st(O)?l>1?(l=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),S):n(O):xt(O)?Et(t,p,"whitespace")(O):(l+=1,u&&(u=!1,o+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),u=!0,p):(t.enter("data"),h(O)))}function h(O){return O===null||O===124||Ut(O)?(t.exit("data"),p(O)):(t.consume(O),O===92?y:h)}function y(O){return O===92||O===124?(t.consume(O),h):h(O)}function S(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(O):(t.enter("tableDelimiterRow"),u=!1,xt(O)?Et(t,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?v(O):O===124?(u=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),w):N(O)}function w(O){return xt(O)?Et(t,v,"whitespace")(O):v(O)}function v(O){return O===58?(l+=1,u=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),b):O===45?(l+=1,b(O)):O===null||st(O)?k(O):N(O)}function b(O){return O===45?(t.enter("tableDelimiterFiller"),_(O)):N(O)}function _(O){return O===45?(t.consume(O),_):O===58?(u=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),x):(t.exit("tableDelimiterFiller"),x(O))}function x(O){return xt(O)?Et(t,k,"whitespace")(O):k(O)}function k(O){return O===124?C(O):O===null||st(O)?!u||o!==l?N(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(O)):N(O)}function N(O){return n(O)}function A(O){return t.enter("tableRow"),M(O)}function M(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),M):O===null||st(O)?(t.exit("tableRow"),e(O)):xt(O)?Et(t,M,"whitespace")(O):(t.enter("data"),R(O))}function R(O){return O===null||O===124||Ut(O)?(t.exit("data"),M(O)):(t.consume(O),O===92?j:R)}function j(O){return O===92||O===124?(t.consume(O),R):R(O)}}function iF(t,e){let n=-1,i=!0,o=0,l=[0,0,0,0],u=[0,0,0,0],a=!1,d=0,f,p,h;const y=new JP;for(;++n<t.length;){const S=t[n],C=S[1];S[0]==="enter"?C.type==="tableHead"?(a=!1,d!==0&&(kx(y,e,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},y.add(n,0,[["enter",f,e]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,h=void 0,l=[0,0,0,0],u=[0,n+1,0,0],a&&(a=!1,p={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},y.add(n,0,[["enter",p,e]])),o=C.type==="tableDelimiterRow"?2:p?3:1):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,u[2]===0&&(l[1]!==0&&(u[0]=u[1],h=Ef(y,e,l,o,void 0,h),l=[0,0,0,0]),u[2]=n)):C.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(u[0]=u[1],h=Ef(y,e,l,o,void 0,h)),l=u,u=[l[1],n,0,0])):C.type==="tableHead"?(a=!0,d=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(d=n,l[1]!==0?(u[0]=u[1],h=Ef(y,e,l,o,n,h)):u[1]!==0&&(h=Ef(y,e,u,o,n,h)),o=0):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&kx(y,e,d,f,p),y.consume(e.events),n=-1;++n<e.events.length;){const S=e.events[n];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=tF(e.events,n))}return t}function Ef(t,e,n,i,o,l){const u=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(l.end=Object.assign({},Vl(e.events,n[0])),t.add(n[0],0,[["exit",l,e]]));const d=Vl(e.events,n[1]);if(l={type:u,start:Object.assign({},d),end:Object.assign({},d)},t.add(n[1],0,[["enter",l,e]]),n[2]!==0){const f=Vl(e.events,n[2]),p=Vl(e.events,n[3]),h={type:a,start:Object.assign({},f),end:Object.assign({},p)};if(t.add(n[2],0,[["enter",h,e]]),i!==2){const y=e.events[n[2]],S=e.events[n[3]];if(y[1].end=Object.assign({},S[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,w=n[3]-n[2]-1;t.add(C,w,[])}}t.add(n[3]+1,0,[["exit",h,e]])}return o!==void 0&&(l.end=Object.assign({},Vl(e.events,o)),t.add(o,0,[["exit",l,e]]),l=void 0),l}function kx(t,e,n,i,o){const l=[],u=Vl(e.events,n);o&&(o.end=Object.assign({},u),l.push(["exit",o,e])),i.end=Object.assign({},u),l.push(["exit",i,e]),t.add(n+1,0,l)}function Vl(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const sF={name:"tasklistCheck",tokenize:aF};function oF(){return{text:{91:sF}}}function aF(t,e,n){const i=this;return o;function o(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(d):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(d),t.exit("taskListCheckMarker"),l)}function l(d){return Ut(d)?(t.enter("taskListCheckValueUnchecked"),t.consume(d),t.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(t.enter("taskListCheckValueChecked"),t.consume(d),t.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(t.enter("taskListCheckMarker"),t.consume(d),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(d)}function a(d){return st(d)?e(d):xt(d)?t.check({tokenize:lF},e,n)(d):n(d)}}function lF(t,e,n){return Et(t,i,"whitespace");function i(o){return o===null?n(o):e(o)}}function cF(t){return s3([OP(),qP(),ZP(t),nF(),oF()])}const uF={};function dF(t){const e=this,n=t||uF,i=e.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(cF(n)),l.push(NP()),u.push(DP(n))}const fF=D.memo(function(e){const n=ve.c(11),{children:i,className:o,inverted:l}=e,u=l===void 0?!1:l;let a;n[0]!==u?(a={code(S){const{className:C,children:w,...v}=S,b=/language-(\w+)/.exec(C||""),_=b?b[1]:"",x=!_,k=Array.isArray(w)?w.join(""):String(w);return!x&&_?g.jsx("div",{className:"w-full max-w-full overflow-x-auto my-2 min-w-0",children:g.jsx(tv,{theme:u?qu.nightOwl:qu.oneDark,code:k.trim(),language:_,children:hF})}):g.jsx("code",{className:Ee("px-1.5 py-0.5 rounded text-sm font-mono",u?"bg-primary-foreground/20 text-primary-foreground":"bg-muted",C),...v,children:w})},a(S){const{href:C,children:w,...v}=S;return g.jsx("a",{href:C,target:"_blank",rel:"noopener noreferrer",className:Ee("underline underline-offset-2 transition-colors",u?"text-primary-foreground/80 hover:text-primary-foreground":"text-primary hover:text-primary/80"),...v,children:w})},p(S){const{children:C}=S;return g.jsx("p",{className:"last:mb-0 leading-relaxed wrap-break-words",children:C})},ul(S){const{children:C}=S;return g.jsx("ul",{className:"list-outside list-disc pl-8",children:C})},ol(S){const{children:C}=S;return g.jsx("ol",{className:"list-outside list-decimal pl-8",children:C})},li(S){const{children:C,className:w}=S,v=w==null?void 0:w.includes("nested");return g.jsx("li",{className:Ee("leading-snug",v&&"ml-8"),children:C})},h1(S){const{children:C}=S;return g.jsx("h1",{className:"text-lg font-semibold mb-1.5 mt-3 first:mt-0",children:C})},h2(S){const{children:C}=S;return g.jsx("h2",{className:"text-base font-semibold mb-1.5 mt-2.5 first:mt-0",children:C})},h3(S){const{children:C}=S;return g.jsx("h3",{className:"text-sm font-semibold mb-1 mt-2 first:mt-0",children:C})},blockquote(S){const{children:C}=S;return g.jsx("blockquote",{className:Ee("border-l-2 pl-3 my-1.5 italic",u?"border-primary-foreground/40 text-primary-foreground/70":"border-muted-foreground/40 text-muted-foreground"),children:C})},strong(S){const{children:C}=S;return g.jsx("strong",{className:Ee("font-semibold",u&&"text-primary-foreground"),children:C})},em(S){const{children:C}=S;return g.jsx("em",{className:"italic",children:C})},hr(){return g.jsx("hr",{className:Ee("my-3",u?"border-primary-foreground/30":"border-border")})},table(S){const{children:C}=S;return g.jsx("div",{className:"my-2 overflow-x-auto max-w-full",children:g.jsx("table",{className:"w-full border-collapse text-sm",children:C})})},th(S){const{children:C}=S;return g.jsx("th",{className:Ee("border border-border px-2 py-1.5 text-left font-semibold",u?"bg-primary-foreground/10 text-primary-foreground":"bg-muted"),children:C})},td(S){const{children:C}=S;return g.jsx("td",{className:Ee("border px-2 py-1.5",u?"border-primary-foreground/20":"border-border"),children:C})}},n[0]=u,n[1]=a):a=n[1];const d=a;let f;n[2]!==o?(f=Ee("visualization-container markdown-render overflow-x-auto wrap-break-words break",o),n[2]=o,n[3]=f):f=n[3];let p;n[4]===Symbol.for("react.memo_cache_sentinel")?(p=[dF],n[4]=p):p=n[4];let h;n[5]!==i||n[6]!==d?(h=g.jsx(ZB,{remarkPlugins:p,components:d,children:i}),n[5]=i,n[6]=d,n[7]=h):h=n[7];let y;return n[8]!==f||n[9]!==h?(y=g.jsx("div",{className:f,children:h}),n[8]=f,n[9]=h,n[10]=y):y=n[10],y});function hF(t){const{className:e,style:n,tokens:i,getLineProps:o,getTokenProps:l}=t;return g.jsx("pre",{className:Ee("rounded-lg text-sm p-3",e),style:n,children:i.map((u,a)=>g.jsx("div",{...o({line:u}),children:u.map((d,f)=>g.jsx("span",{...l({token:d})},f))},a))})}function Ex(t){return t.filter(e=>e.type==="text").map(e=>e.text).join("")}function pF(t,e){const n=e.findIndex(i=>i.message.id===t);if(n<=0)return null;for(let i=n-1;i>=0;i--){const o=e[i];if(o.message.role==="assistant"&&o.message.status!=="streaming")return o.message.id}return null}function mF(t,e){const n=t.map(u=>({message:u.message,parts:u.parts,isQueued:!1})),i=e.map(u=>({message:{id:u.id,role:"user",sessionId:u.sessionId,createdAt:u.createdAt},parts:[{id:`${u.id}-part`,messageId:u.id,createdAt:u.createdAt,type:"text",text:u.content}],isQueued:!0,queueId:u.id})),o=[...n].sort((u,a)=>u.message.createdAt-a.message.createdAt),l=[...i].sort((u,a)=>u.message.createdAt-a.message.createdAt);return[...o,...l]}function gF(){const t=ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsxs("div",{className:"mx-4 mt-4 flex items-center gap-2 text-sm text-muted-foreground bg-muted/50 rounded-lg px-3 py-2 border border-border",children:[g.jsx(Hx,{className:"size-4 animate-pulse"}),g.jsx("span",{children:"Compacting conversation..."})]}),t[0]=e):e=t[0],e}function vF(){const t=ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsxs("div",{className:"mx-4 mt-4 flex items-center gap-2 text-sm text-green-600 dark:text-green-400 bg-green-500/10 rounded-lg px-3 py-2 border border-green-500/20",children:[g.jsx(ZE,{className:"size-4"}),g.jsx("span",{children:"Compaction complete"})]}),t[0]=e):e=t[0],e}function _F(t){const e=ve.c(8),{message:n,textContent:i,onRetry:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsxs("div",{className:"flex items-center gap-1.5 text-xs uppercase tracking-wide text-destructive ml-3",children:[g.jsx(Lu,{className:"size-3"}),"Compaction Failed"]}),e[0]=l):l=e[0];const u=i||n.error||"Compaction failed. The conversation could not be summarized.";let a;e[1]!==u?(a=g.jsx("p",{className:"text-sm text-destructive/90",children:u}),e[1]=u,e[2]=a):a=e[2];let d;e[3]!==o?(d=o&&g.jsxs(ze,{variant:"outline",size:"sm",onClick:o,className:"mt-2 h-7 text-xs gap-1.5",children:[g.jsx($x,{className:"size-3"}),"Retry"]}),e[3]=o,e[4]=d):d=e[4];let f;return e[5]!==a||e[6]!==d?(f=g.jsxs("div",{className:"flex flex-col gap-1 mb-4 animate-slide-up min-w-0",children:[l,g.jsxs("div",{className:"rounded-2xl px-4 py-3 max-w-full bg-destructive/10 border border-destructive/30 rounded-bl-md",children:[a,d]})]}),e[5]=a,e[6]=d,e[7]=f):f=e[7],f}function yF(t){const e=ve.c(15),{part:n}=t,[i,o]=D.useState(!1),l=n.overflow?"overflow":n.auto?"auto":"manual";let u;e[0]!==i?(u=()=>o(!i),e[0]=i,e[1]=u):u=e[1];let a;e[2]!==i?(a=i?g.jsx(sc,{className:"size-3"}):g.jsx(Ai,{className:"size-3"}),e[2]=i,e[3]=a):a=e[3];const d=l==="overflow"?"Context overflow":l==="auto"?"Auto":"Manual";let f;e[4]!==d?(f=g.jsxs("span",{className:"border-b border-dashed border-muted-foreground/40 pb-px",children:[d," compaction"]}),e[4]=d,e[5]=f):f=e[5];let p;e[6]!==u||e[7]!==a||e[8]!==f?(p=g.jsxs("button",{onClick:u,className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[a,f]}),e[6]=u,e[7]=a,e[8]=f,e[9]=p):p=e[9];let h;e[10]!==i?(h=i&&g.jsx("div",{className:"mt-2 text-xs text-muted-foreground italic",children:"Summary available in the assistant message below"}),e[10]=i,e[11]=h):h=e[11];let y;return e[12]!==p||e[13]!==h?(y=g.jsxs("div",{className:"flex flex-col items-center my-4",children:[p,h]}),e[12]=p,e[13]=h,e[14]=y):y=e[14],y}const bF=D.memo(function(e){const n=ve.c(13),{parts:i,pendingPermissions:o,onPermissionResponse:l,onNavigateToSubagent:u,inverted:a}=e,d=a===void 0?!1:a;let f;if(n[0]!==d||n[1]!==u||n[2]!==l||n[3]!==i||n[4]!==o){const h=[...i].sort(wF);let y;n[6]!==d||n[7]!==u||n[8]!==l||n[9]!==o?(y=S=>{switch(S.type){case"text":return g.jsx("div",{className:"min-w-0",children:g.jsx(fF,{inverted:d,children:S.text||"..."})},S.id);case"reasoning":return g.jsx("div",{className:"visualization-container text-muted-foreground text-sm italic border-l-2 border-muted-foreground/30 pl-3 my-2 wrap-break-word",children:S.text},S.id);case"tool":return g.jsx(D7,{part:S,pendingPermissions:o,onPermissionResponse:l,onNavigateToSubagent:u},S.id);case"image":return g.jsx("img",{src:S.url,alt:"",className:"max-w-full rounded-lg mt-2"},S.id);case"file":return g.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-sm",children:S.filename||"unnamed"},S.id);default:return null}},n[6]=d,n[7]=u,n[8]=l,n[9]=o,n[10]=y):y=n[10],f=h.map(y),n[0]=d,n[1]=u,n[2]=l,n[3]=i,n[4]=o,n[5]=f}else f=n[5];let p;return n[11]!==f?(p=g.jsx(g.Fragment,{children:f}),n[11]=f,n[12]=p):p=n[12],p},(t,e)=>{if(t.parts!==e.parts||t.inverted!==e.inverted||t.onPermissionResponse!==e.onPermissionResponse||t.onNavigateToSubagent!==e.onNavigateToSubagent)return!1;if(!t.parts.some(u=>u.type==="tool"&&u.state.status==="pending"))return!0;const i=new Set(t.parts.filter(u=>u.type==="tool").map(u=>u.callId)),o=t.pendingPermissions.filter(u=>i.has(u.toolCallId)),l=e.pendingPermissions.filter(u=>i.has(u.toolCallId));if(o.length!==l.length)return!1;for(let u=0;u<o.length;u++)if(o[u].toolCallId!==l[u].toolCallId)return!1;return!0});function xF(t){const e=ve.c(90),{session:n,messagesWithParts:i,queuedMessages:o,preconfigs:l,prompts:u,models:a,connectedProviderIds:d,connectableProviderIds:f,defaultModel:p,onSendMessage:h,onRemoveFromQueue:y,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,pendingPermissions:v,onPermissionResponse:b,onRename:_,usage:x,modelName:k,onNavigateToSubagent:N,onNavigateBack:A,isStreaming:M,onInterrupt:R,onRevert:j,onFork:O,onCompact:B,isCompacting:q,compactionSuccess:$,onClearCompactionSuccess:V,serverUrl:K,apiToken:G,selectedVariant:Y,variants:Q,inputRef:I}=t,z=!n.parentId&&n.status==="active";let H,F;e[0]!==$||e[1]!==V?(H=()=>{if($){const pe=setTimeout(()=>{V==null||V()},3e3);return()=>clearTimeout(pe)}},F=[$,V],e[0]=$,e[1]=V,e[2]=H,e[3]=F):(H=e[2],F=e[3]),D.useEffect(H,F);const J=D.useRef(null),[ne,Z]=D.useState(!0);let W;e[4]!==i||e[5]!==o?(W=mF(i,o),e[4]=i,e[5]=o,e[6]=W):W=e[6];const U=W;let te;e[7]===Symbol.for("react.memo_cache_sentinel")?(te=()=>{Z(!0),J.current&&(J.current.scrollTop=J.current.scrollHeight)},e[7]=te):te=e[7];let ie;e[8]!==n.id?(ie=[n.id],e[8]=n.id,e[9]=ie):ie=e[9],D.useEffect(te,ie);let ae;e[10]!==ne?(ae=()=>{J.current&&ne&&(J.current.scrollTop=J.current.scrollHeight)},e[10]=ne,e[11]=ae):ae=e[11];let se;e[12]!==ne||e[13]!==i?(se=[i,ne],e[12]=ne,e[13]=i,e[14]=se):se=e[14],D.useEffect(ae,se);let _e,Te;e[15]===Symbol.for("react.memo_cache_sentinel")?(_e=()=>{const pe=J.current;if(!pe)return;const Me=()=>{const{scrollHeight:Le,scrollTop:nt,clientHeight:je}=pe,Ve=Le-nt-je;Z(Ve<150)};return pe.addEventListener("scroll",Me,{passive:!0}),()=>pe.removeEventListener("scroll",Me)},Te=[],e[15]=_e,e[16]=Te):(_e=e[15],Te=e[16]),D.useEffect(_e,Te);let De;if(e[17]!==i||e[18]!==v||e[19]!==n.id){let pe;e[21]!==i||e[22]!==n.id?(pe=Me=>Me.sessionId!==n.id?!1:!i.some(Le=>Le.parts.some(nt=>nt.type==="tool"&&nt.callId===Me.toolCallId)),e[21]=i,e[22]=n.id,e[23]=pe):pe=e[23],De=v.filter(pe),e[17]=i,e[18]=v,e[19]=n.id,e[20]=De}else De=e[20];const Ke=De,Ae=i.length>=4;let rt;e[24]!==f||e[25]!==d||e[26]!==p||e[27]!==q||e[28]!==M||e[29]!==k||e[30]!==a||e[31]!==C||e[32]!==S||e[33]!==w||e[34]!==B||e[35]!==R||e[36]!==A||e[37]!==_||e[38]!==l||e[39]!==Y||e[40]!==n||e[41]!==Ae||e[42]!==x||e[43]!==Q?(rt=g.jsx(tO,{session:n,preconfigs:l,models:a,defaultModel:p,usage:x,modelName:k,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,onRename:_,onNavigateBack:A,isStreaming:M,onInterrupt:R,onCompact:B,isCompacting:q,canCompact:Ae,connectedProviderIds:d,connectableProviderIds:f,selectedVariant:Y,variants:Q}),e[24]=f,e[25]=d,e[26]=p,e[27]=q,e[28]=M,e[29]=k,e[30]=a,e[31]=C,e[32]=S,e[33]=w,e[34]=B,e[35]=R,e[36]=A,e[37]=_,e[38]=l,e[39]=Y,e[40]=n,e[41]=Ae,e[42]=x,e[43]=Q,e[44]=rt):rt=e[44];let Je;e[45]!==q?(Je=q&&g.jsx(gF,{}),e[45]=q,e[46]=Je):Je=e[46];let Qe;e[47]!==$?(Qe=$&&g.jsx(vF,{}),e[47]=$,e[48]=Qe):Qe=e[48];let ot;e[49]!==n.status?(ot=n.status==="closed"&&g.jsx(Df,{className:"mx-4 mt-4",children:g.jsx(Mf,{children:"This session is archived. You can reopen it from the sidebar."})}),e[49]=n.status,e[50]=ot):ot=e[50];let ue;e[51]!==O||e[52]!==j||e[53]!==U||e[54]!==q||e[55]!==z||e[56]!==i||e[57]!==B||e[58]!==N||e[59]!==b||e[60]!==y||e[61]!==v||e[62]!==n.id?(ue=U.length===0?g.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[g.jsx("p",{className:"text-lg mb-2",children:"Start a conversation"}),g.jsx("p",{className:"text-sm",children:"Send a message below to begin."})]}):U.map(pe=>{const Me=pe.parts.find(SF);if(Bj(pe.message)&&pe.message.mode==="compact_failed")return g.jsx(_F,{message:pe.message,textContent:Ex(pe.parts),onRetry:z&&!q?B:void 0},pe.message.id);if(Me)return g.jsx(yF,{part:Me},pe.message.id);const nt=!pe.isQueued&&pe.message.role==="user",je=nt?pF(pe.message.id,i):null;return g.jsx(nO,{message:pe.message,textContent:Ex(pe.parts),isQueued:pe.isQueued,onRemove:pe.isQueued?()=>y(pe.queueId):void 0,canRevert:nt&&je!==null,onRevert:je?()=>j==null?void 0:j(n.id,je):void 0,canFork:nt&&je!==null,onFork:je?()=>O==null?void 0:O(n.id,pe.message.id):void 0,children:pe.parts.length===0?g.jsx("span",{className:"opacity-50",children:"..."}):g.jsx(bF,{parts:pe.parts,pendingPermissions:v,onPermissionResponse:b,onNavigateToSubagent:N,inverted:pe.message.role==="user"})},pe.message.id)}),e[51]=O,e[52]=j,e[53]=U,e[54]=q,e[55]=z,e[56]=i,e[57]=B,e[58]=N,e[59]=b,e[60]=y,e[61]=v,e[62]=n.id,e[63]=ue):ue=e[63];let it;e[64]!==b||e[65]!==Ke?(it=Ke.length>0&&g.jsx("div",{className:"mt-4 flex flex-col gap-2",children:Ke.map(pe=>{var Le;const Me=typeof((Le=pe.args)==null?void 0:Le.command)=="string"?pe.args.command:JSON.stringify(pe.args,null,2);return g.jsxs("div",{className:"p-3 bg-warning/10 border border-warning/30 rounded-lg flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-sm font-medium",children:pe.toolName}),g.jsx("span",{className:"text-xs text-muted-foreground",children:pe.permissionType})]}),g.jsx("p",{className:"text-sm",children:pe.message}),g.jsxs(Mo,{children:[g.jsx(jo,{asChild:!0,children:g.jsxs("button",{className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full text-left",children:[g.jsx(Ai,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Oo,{children:g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 mt-1 overflow-x-auto whitespace-pre-wrap break-words",children:Me})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(ze,{variant:"outline",size:"sm",onClick:()=>b(pe.toolCallId,!1,!1),children:"Deny"}),g.jsx(ze,{variant:"secondary",size:"sm",onClick:()=>b(pe.toolCallId,!0,!1),children:"Approve"}),g.jsx(ze,{size:"sm",onClick:()=>b(pe.toolCallId,!0,!0),children:"Always Allow"})]})]},pe.toolCallId)})}),e[64]=b,e[65]=Ke,e[66]=it):it=e[66];let Ze;e[67]!==ue||e[68]!==it?(Ze=g.jsx(yc,{className:"flex-1 min-h-0",ref:J,children:g.jsxs("div",{className:"p-4",children:[ue,it]})}),e[67]=ue,e[68]=it,e[69]=Ze):Ze=e[69];let dt;e[70]!==G||e[71]!==I||e[72]!==q||e[73]!==h||e[74]!==u||e[75]!==K||e[76]!==n.parentId||e[77]!==n.status||e[78]!==n.workspaceId?(dt=n.status==="active"&&!n.parentId&&g.jsx(B7,{ref:I,onSendMessage:h,disabled:q,workspaceId:n.workspaceId,serverUrl:K,apiToken:G,prompts:u}),e[70]=G,e[71]=I,e[72]=q,e[73]=h,e[74]=u,e[75]=K,e[76]=n.parentId,e[77]=n.status,e[78]=n.workspaceId,e[79]=dt):dt=e[79];let ce;e[80]!==n.parentId?(ce=n.parentId&&g.jsxs("div",{className:"p-4 border-t border-border bg-muted/50 text-center flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[g.jsx(j4,{className:"size-4"}),"This is a subagent session (read-only)"]}),e[80]=n.parentId,e[81]=ce):ce=e[81];let xe;return e[82]!==rt||e[83]!==Je||e[84]!==Qe||e[85]!==ot||e[86]!==Ze||e[87]!==dt||e[88]!==ce?(xe=g.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[rt,Je,Qe,ot,Ze,dt,ce]}),e[82]=rt,e[83]=Je,e[84]=Qe,e[85]=ot,e[86]=Ze,e[87]=dt,e[88]=ce,e[89]=xe):xe=e[89],xe}function SF(t){return t.type==="compaction"}function wF(t,e){return t.createdAt-e.createdAt}function CF(t){const e=ve.c(10);let n,i,o;e[0]!==t?({className:n,orientation:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"horizontal":o;let u;e[4]!==n?(u=Ee("group/tabs flex gap-2 data-horizontal:flex-col",n),e[4]=n,e[5]=u):u=e[5];let a;return e[6]!==l||e[7]!==i||e[8]!==u?(a=g.jsx(BD,{"data-slot":"tabs","data-orientation":l,className:u,...i}),e[6]=l,e[7]=i,e[8]=u,e[9]=a):a=e[9],a}const kF=cc("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function EF(t){const e=ve.c(11);let n,i,o;e[0]!==t?({className:n,variant:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"default":o;let u;e[4]!==n||e[5]!==l?(u=Ee(kF({variant:l}),n),e[4]=n,e[5]=l,e[6]=u):u=e[6];let a;return e[7]!==i||e[8]!==u||e[9]!==l?(a=g.jsx(zD,{"data-slot":"tabs-list","data-variant":l,className:u,...i}),e[7]=i,e[8]=u,e[9]=l,e[10]=a):a=e[10],a}function Cu(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(PD,{"data-slot":"tabs-trigger",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function ku(t){const e=ve.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=Ee("flex-1 text-sm outline-none",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(FD,{"data-slot":"tabs-content",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Ax(t){return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function Rx(t){const e=ve.c(29),{permission:n,onRevoke:i}=t,o=!!n.revokedAt,l=o?"outline":"secondary";let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Vx,{className:"size-3","data-icon":"inline-start"}),e[0]=u):u=e[0];let a;e[1]!==n.permissionType||e[2]!==l?(a=g.jsxs(Kn,{variant:l,children:[u,n.permissionType]}),e[1]=n.permissionType,e[2]=l,e[3]=a):a=e[3];let d;e[4]!==o?(d=o&&g.jsx(Kn,{variant:"outline",className:"text-muted-foreground",children:"Revoked"}),e[4]=o,e[5]=d):d=e[5];let f;e[6]!==a||e[7]!==d?(f=g.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a,d]}),e[6]=a,e[7]=d,e[8]=f):f=e[8];let p;e[9]!==n.permissionKey?(p=g.jsx("p",{className:"text-sm font-mono truncate text-muted-foreground",children:n.permissionKey}),e[9]=n.permissionKey,e[10]=p):p=e[10];let h;e[11]!==n.grantedAt?(h=Ax(n.grantedAt),e[11]=n.grantedAt,e[12]=h):h=e[12];let y;e[13]!==n.revokedAt?(y=n.revokedAt&&` • Revoked ${Ax(n.revokedAt)}`,e[13]=n.revokedAt,e[14]=y):y=e[14];let S;e[15]!==h||e[16]!==y?(S=g.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Granted ",h,y]}),e[15]=h,e[16]=y,e[17]=S):S=e[17];let C;e[18]!==f||e[19]!==p||e[20]!==S?(C=g.jsxs("div",{className:"flex-1 min-w-0",children:[f,p,S]}),e[18]=f,e[19]=p,e[20]=S,e[21]=C):C=e[21];let w;e[22]!==o||e[23]!==i||e[24]!==n.id?(w=!o&&g.jsx(ze,{variant:"ghost",size:"icon",onClick:()=>i(n.id),className:"size-8 text-destructive hover:text-destructive",children:g.jsx(ac,{className:"size-4"})}),e[22]=o,e[23]=i,e[24]=n.id,e[25]=w):w=e[25];let v;return e[26]!==C||e[27]!==w?(v=g.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border last:border-0",children:[C,w]}),e[26]=C,e[27]=w,e[28]=v):v=e[28],v}function AF(t){const e=ve.c(30),{open:n,onOpenChange:i,title:o,description:l,confirmLabel:u,cancelLabel:a,variant:d,onConfirm:f,onCancel:p}=t,h=u===void 0?"Confirm":u,y=a===void 0?"Cancel":a,S=d===void 0?"default":d;let C;e[0]!==p||e[1]!==i?(C=()=>{p==null||p(),i(!1)},e[0]=p,e[1]=i,e[2]=C):C=e[2];const w=C;let v;e[3]!==f||e[4]!==i?(v=()=>{f(),i(!1)},e[3]=f,e[4]=i,e[5]=v):v=e[5];const b=v;let _;e[6]!==o?(_=g.jsx(_c,{children:o}),e[6]=o,e[7]=_):_=e[7];let x;e[8]!==l?(x=g.jsx(ad,{children:l}),e[8]=l,e[9]=x):x=e[9];let k;e[10]!==_||e[11]!==x?(k=g.jsxs(vc,{children:[_,x]}),e[10]=_,e[11]=x,e[12]=k):k=e[12];let N;e[13]!==y||e[14]!==w?(N=g.jsx(ze,{variant:"outline",onClick:w,children:y}),e[13]=y,e[14]=w,e[15]=N):N=e[15];const A=S==="destructive"?"destructive":"default";let M;e[16]!==h||e[17]!==b||e[18]!==A?(M=g.jsx(ze,{variant:A,onClick:b,children:h}),e[16]=h,e[17]=b,e[18]=A,e[19]=M):M=e[19];let R;e[20]!==M||e[21]!==N?(R=g.jsxs(Mh,{children:[N,M]}),e[20]=M,e[21]=N,e[22]=R):R=e[22];let j;e[23]!==R||e[24]!==k?(j=g.jsxs(gc,{className:"sm:max-w-[425px]",children:[k,R]}),e[23]=R,e[24]=k,e[25]=j):j=e[25];let O;return e[26]!==i||e[27]!==n||e[28]!==j?(O=g.jsx(mc,{open:n,onOpenChange:i,children:j}),e[26]=i,e[27]=n,e[28]=j,e[29]=O):O=e[29],O}function RF(t){const e=ve.c(48),{provider:n,onConnect:i,onDisconnect:o}=t,[l,u]=D.useState(!1);let a,d;e[0]!==n.connected||e[1]!==n.error?(a=()=>{(n.error||n.connected)&&u(!1)},d=[n.error,n.connected],e[0]=n.connected,e[1]=n.error,e[2]=a,e[3]=d):(a=e[2],d=e[3]),D.useEffect(a,d);let f,p;e[4]!==n.authorizationUrl?(f=()=>{n.authorizationUrl&&u(!1)},p=[n.authorizationUrl],e[4]=n.authorizationUrl,e[5]=f,e[6]=p):(f=e[5],p=e[6]),D.useEffect(f,p);let h;e[7]!==i?(h=()=>{u(!0),i()},e[7]=i,e[8]=h):h=e[8];const y=h;let S;e[9]!==o?(S=()=>{o()},e[9]=o,e[10]=S):S=e[10];const C=S,w=`size-2 rounded-full ${n.connected?"bg-green-500":"bg-muted-foreground"}`;let v;e[11]!==w?(v=g.jsx("div",{className:w}),e[11]=w,e[12]=v):v=e[12];const b=n.displayName||n.provider;let _;e[13]!==b?(_=g.jsx("span",{className:"text-sm font-medium",children:b}),e[13]=b,e[14]=_):_=e[14];let x;e[15]!==_||e[16]!==v?(x=g.jsxs("div",{className:"flex items-center gap-2",children:[v,_]}),e[15]=_,e[16]=v,e[17]=x):x=e[17];let k;e[18]!==n.connected?(k=n.connected&&g.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected"}),e[18]=n.connected,e[19]=k):k=e[19];let N;e[20]!==x||e[21]!==k?(N=g.jsxs("div",{className:"flex items-center justify-between",children:[x,k]}),e[20]=x,e[21]=k,e[22]=N):N=e[22];let A;e[23]!==n.error?(A=n.error&&g.jsx("p",{className:"text-xs text-destructive",children:n.error}),e[23]=n.error,e[24]=A):A=e[24];let M;e[25]!==n.connected||e[26]!==n.connectedAt?(M=n.connected&&n.connectedAt&&g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Connected ",new Date(n.connectedAt).toLocaleDateString()]}),e[25]=n.connected,e[26]=n.connectedAt,e[27]=M):M=e[27];let R;e[28]!==y||e[29]!==l||e[30]!==n.authorizationUrl||e[31]!==n.connected?(R=!n.connected&&!n.authorizationUrl&&g.jsxs(ze,{size:"sm",onClick:y,disabled:l,children:[l?g.jsx(Br,{className:"size-3 animate-spin","data-icon":"inline-start"}):null,"Connect"]}),e[28]=y,e[29]=l,e[30]=n.authorizationUrl,e[31]=n.connected,e[32]=R):R=e[32];let j;e[33]!==n.authorizationUrl||e[34]!==n.connected?(j=!n.connected&&n.authorizationUrl&&g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("a",{href:n.authorizationUrl,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-xs text-blue-500 underline break-all",children:n.authorizationUrl}),g.jsxs(ze,{variant:"outline",size:"sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.authorizationUrl)}catch{}},children:[g.jsx(Ou,{className:"size-3","data-icon":"inline-start"}),"Copy URL"]})]}),e[33]=n.authorizationUrl,e[34]=n.connected,e[35]=j):j=e[35];let O;e[36]!==C||e[37]!==n.connected?(O=n.connected&&g.jsxs(ze,{variant:"destructive",size:"sm",onClick:C,children:[g.jsx(_5,{className:"size-3","data-icon":"inline-start"}),"Disconnect"]}),e[36]=C,e[37]=n.connected,e[38]=O):O=e[38];let B;e[39]!==R||e[40]!==j||e[41]!==O?(B=g.jsxs("div",{className:"flex gap-2",children:[R,j,O]}),e[39]=R,e[40]=j,e[41]=O,e[42]=B):B=e[42];let q;return e[43]!==N||e[44]!==A||e[45]!==M||e[46]!==B?(q=g.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-border p-4",children:[N,A,M,B]}),e[43]=N,e[44]=A,e[45]=M,e[46]=B,e[47]=q):q=e[47],q}function TF(t){const e=ve.c(10),{token:n,onLogout:i}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx("span",{className:"text-muted-foreground",children:"Token:"}),e[0]=o):o=e[0];let l;e[1]!==n?(l=H5(n),e[1]=n,e[2]=l):l=e[2];let u;e[3]!==l?(u=g.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[o,g.jsx("code",{className:"font-mono text-foreground bg-background px-1.5 py-0.5 rounded text-[10px]",children:l})]}),e[3]=l,e[4]=u):u=e[4];let a;e[5]!==i?(a=g.jsx(ze,{variant:"destructive",size:"sm",onClick:i,title:"Disconnect and clear token",children:"Logout"}),e[5]=i,e[6]=a):a=e[6];let d;return e[7]!==u||e[8]!==a?(d=g.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-md bg-muted",children:[u,a]}),e[7]=u,e[8]=a,e[9]=d):d=e[9],d}const NF={neutral:{label:"Neutral",colors:["bg-zinc-400","bg-zinc-600","bg-zinc-800"]},ocean:{label:"Ocean",colors:["bg-sky-300","bg-sky-500","bg-slate-700"]},forest:{label:"Forest",colors:["bg-emerald-300","bg-emerald-500","bg-green-800"]},sunset:{label:"Sunset",colors:["bg-orange-300","bg-amber-500","bg-orange-800"]},amethyst:{label:"Amethyst",colors:["bg-violet-300","bg-violet-500","bg-purple-800"]}};function Eu(t){const e=ve.c(15),{scheme:n,currentScheme:i,onClick:o}=t,l=n===i,u=NF[n];let a;e[0]!==o||e[1]!==n?(a=()=>o(n),e[0]=o,e[1]=n,e[2]=a):a=e[2];const d=`
|
|
564
|
+
flex flex-col items-center gap-1.5 p-2 rounded-lg border transition-all
|
|
565
|
+
${l?"border-primary bg-primary/5":"border-border bg-transparent hover:bg-muted/50"}
|
|
566
|
+
`,f=u.label;let p;e[3]!==u.colors?(p=u.colors.map(DF),e[3]=u.colors,e[4]=p):p=e[4];let h;e[5]!==p?(h=g.jsx("div",{className:"flex gap-0.5",children:p}),e[5]=p,e[6]=h):h=e[6];let y;e[7]!==n?(y=g.jsx("span",{className:"text-[10px] text-muted-foreground capitalize",children:n}),e[7]=n,e[8]=y):y=e[8];let S;return e[9]!==u.label||e[10]!==a||e[11]!==d||e[12]!==h||e[13]!==y?(S=g.jsxs("button",{type:"button",onClick:a,className:d,title:f,children:[h,y]}),e[9]=u.label,e[10]=a,e[11]=d,e[12]=h,e[13]=y,e[14]=S):S=e[14],S}function DF(t,e){return g.jsx("div",{className:`w-4 h-4 rounded-full ${t}`},e)}function MF(t){var De;const e=ve.c(218),{open:n,onOpenChange:i,permissions:o,onRefreshPermissions:l,onRevokePermission:u,onRevokeAllPermissions:a,apiToken:d,onLogout:f,providerStatuses:p,onConnectProvider:h,onDisconnectProvider:y,chatFinishSoundEnabled:S,onChatFinishSoundEnabledChange:C,permissionSoundEnabled:w,onPermissionSoundEnabledChange:v}=t,{mode:b,scheme:_,setMode:x,setScheme:k}=kE(),[N,A]=D.useState(!1),R=((De=navigator.userAgentData)==null?void 0:De.platform)==="macOS"||/mac|iphone|ipad|ipod/i.test(navigator.userAgent)?"⌘":"Ctrl";let j,O,B,q,$,V,K,G,Y,Q,I,L,z,H,F,J,ne,Z,W;if(e[0]!==d||e[1]!==S||e[2]!==b||e[3]!==C||e[4]!==h||e[5]!==y||e[6]!==f||e[7]!==i||e[8]!==v||e[9]!==l||e[10]!==u||e[11]!==n||e[12]!==w||e[13]!==o||e[14]!==p||e[15]!==_||e[16]!==x||e[17]!==k){const Ke=[{keys:[R,"1"],description:"Open session list"},{keys:[R,"T"],description:"Open terminal"},{keys:[R,"O"],description:"Toggle overview mode"},{keys:[R,"N"],description:"New session"},{keys:[R,"Shift","N"],description:"New window"},{keys:["Shift","Esc"],description:"Close focused panel"},{keys:["Shift","Enter"],description:"New line in input"},{keys:["Enter"],description:"Send message"},{keys:["↑","↓","←","→"],description:"Navigate sessions"},{keys:["Esc"],description:"Focus chat input"},{keys:["Esc","Esc"],description:"Stop streaming (chat input focused)"}];let Ae,rt,Je,Qe,ot,ue,it,Ze,dt,ce,xe;if(e[37]!==d||e[38]!==S||e[39]!==b||e[40]!==C||e[41]!==f||e[42]!==i||e[43]!==v||e[44]!==l||e[45]!==u||e[46]!==n||e[47]!==w||e[48]!==o||e[49]!==_||e[50]!==x||e[51]!==k){const je=o.filter(LF),Ve=o.filter(OF);q=mc,Q=n,I=i,B=gc,G="sm:max-w-[700px] max-h-[80vh]",e[75]===Symbol.for("react.memo_cache_sentinel")?(Y=g.jsxs(vc,{children:[g.jsx(_c,{children:"Settings"}),g.jsx(ad,{children:"Manage your preferences and permissions"})]}),e[75]=Y):Y=e[75],O=CF,F="account",J="mt-4";let ct;e[76]===Symbol.for("react.memo_cache_sentinel")?(ct=g.jsxs(Cu,{value:"account",children:[g.jsx(Gx,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Account"})]}),e[76]=ct):ct=e[76];let Tt;e[77]===Symbol.for("react.memo_cache_sentinel")?(Tt=g.jsxs(Cu,{value:"appearance",children:[g.jsx(U4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Appearance"})]}),e[77]=Tt):Tt=e[77];let be,et;e[78]===Symbol.for("react.memo_cache_sentinel")?(be=g.jsx(Vx,{className:"size-4 sm:size-3","data-icon":"inline-start"}),et=g.jsx("span",{className:"hidden sm:inline",children:"Permissions"}),e[78]=be,e[79]=et):(be=e[78],et=e[79]);const at=je.length>0&&g.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex size-3.5 items-center justify-center rounded-full bg-primary text-[8px] font-bold leading-none text-primary-foreground sm:static sm:flex sm:size-auto sm:ml-1.5 sm:px-1.5 sm:py-0.5 sm:text-xs sm:font-medium sm:leading-normal",children:je.length});let St;e[80]!==at?(St=g.jsxs(Cu,{value:"permissions",children:[be,et,at]}),e[80]=at,e[81]=St):St=e[81];let Pt;e[82]===Symbol.for("react.memo_cache_sentinel")?(Pt=g.jsxs(Cu,{value:"providers",children:[g.jsx(N4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Providers"})]}),e[82]=Pt):Pt=e[82];let Ft;e[83]===Symbol.for("react.memo_cache_sentinel")?(Ft=g.jsxs(Cu,{value:"keybinds",children:[g.jsx(C4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Keybinds"})]}),e[83]=Ft):Ft=e[83],e[84]!==St?(ne=g.jsxs(EF,{className:"grid w-full grid-cols-5",children:[ct,Tt,St,Pt,Ft]}),e[84]=St,e[85]=ne):ne=e[85];let Gt,$t;e[86]===Symbol.for("react.memo_cache_sentinel")?(Gt=g.jsx(ki,{className:"text-sm font-medium",children:"Session"}),$t=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Manage your current session"}),e[86]=Gt,e[87]=$t):(Gt=e[86],$t=e[87]),e[88]!==d||e[89]!==f?(Z=g.jsx(ku,{value:"account",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[Gt,$t,d?g.jsx(TF,{token:d,onLogout:f}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"No active session"})]})})}),e[88]=d,e[89]=f,e[90]=Z):Z=e[90];let Rn,Tn;e[91]===Symbol.for("react.memo_cache_sentinel")?(Rn=g.jsx(ki,{className:"text-sm font-medium",children:"Mode"}),Tn=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose light, dark, or system theme"}),e[91]=Rn,e[92]=Tn):(Rn=e[91],Tn=e[92]);const Zt=b==="light"?"default":"outline";let on;e[93]!==x?(on=()=>x("light"),e[93]=x,e[94]=on):on=e[94];let Kt;e[95]===Symbol.for("react.memo_cache_sentinel")?(Kt=g.jsx(d5,{className:"size-4","data-icon":"inline-start"}),e[95]=Kt):Kt=e[95];let Un;e[96]!==Zt||e[97]!==on?(Un=g.jsxs(ze,{variant:Zt,className:"justify-start",onClick:on,children:[Kt,"Light"]}),e[96]=Zt,e[97]=on,e[98]=Un):Un=e[98];const oi=b==="dark"?"default":"outline";let ar;e[99]!==x?(ar=()=>x("dark"),e[99]=x,e[100]=ar):ar=e[100];let ai;e[101]===Symbol.for("react.memo_cache_sentinel")?(ai=g.jsx(F4,{className:"size-4","data-icon":"inline-start"}),e[101]=ai):ai=e[101];let Ur;e[102]!==oi||e[103]!==ar?(Ur=g.jsxs(ze,{variant:oi,className:"justify-start",onClick:ar,children:[ai,"Dark"]}),e[102]=oi,e[103]=ar,e[104]=Ur):Ur=e[104];const li=b==="system"?"default":"outline";let $r;e[105]!==x?($r=()=>x("system"),e[105]=x,e[106]=$r):$r=e[106];let pn;e[107]===Symbol.for("react.memo_cache_sentinel")?(pn=g.jsx(z4,{className:"size-4","data-icon":"inline-start"}),e[107]=pn):pn=e[107];let Cn;e[108]!==li||e[109]!==$r?(Cn=g.jsxs(ze,{variant:li,className:"justify-start",onClick:$r,children:[pn,"System"]}),e[108]=li,e[109]=$r,e[110]=Cn):Cn=e[110];let Jt;e[111]!==Un||e[112]!==Ur||e[113]!==Cn?(Jt=g.jsxs("div",{children:[Rn,Tn,g.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[Un,Ur,Cn]})]}),e[111]=Un,e[112]=Ur,e[113]=Cn,e[114]=Jt):Jt=e[114];let Nt,en;e[115]===Symbol.for("react.memo_cache_sentinel")?(Nt=g.jsx(Eo,{}),en=g.jsx(ki,{className:"text-sm font-medium mb-3 block",children:"Notification Sounds"}),e[115]=Nt,e[116]=en):(Nt=e[115],en=e[116]);let Nn;e[117]===Symbol.for("react.memo_cache_sentinel")?(Nn=g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(x5,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm",children:"Chat completion"})]}),e[117]=Nn):Nn=e[117];let Dn;e[118]!==S||e[119]!==C?(Dn=()=>C(!S),e[118]=S,e[119]=C,e[120]=Dn):Dn=e[120];const ci=`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${S?"bg-primary":"bg-muted"}`,qr=`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${S?"translate-x-6":"translate-x-1"}`;let yr;e[121]!==qr?(yr=g.jsx("span",{className:qr}),e[121]=qr,e[122]=yr):yr=e[122];let $n;e[123]!==Dn||e[124]!==ci||e[125]!==yr?($n=g.jsxs("div",{className:"flex items-center justify-between",children:[Nn,g.jsx("button",{type:"button",onClick:Dn,className:ci,children:yr})]}),e[123]=Dn,e[124]=ci,e[125]=yr,e[126]=$n):$n=e[126];let br;e[127]===Symbol.for("react.memo_cache_sentinel")?(br=g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(w5,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"text-sm",children:"Permission requests"})]}),e[127]=br):br=e[127];let Mn;e[128]!==v||e[129]!==w?(Mn=()=>v(!w),e[128]=v,e[129]=w,e[130]=Mn):Mn=e[130];const Qn=`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${w?"bg-primary":"bg-muted"}`,lr=`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${w?"translate-x-6":"translate-x-1"}`;let qn;e[131]!==lr?(qn=g.jsx("span",{className:lr}),e[131]=lr,e[132]=qn):qn=e[132];let Mt;e[133]!==Mn||e[134]!==Qn||e[135]!==qn?(Mt=g.jsxs("div",{className:"flex items-center justify-between",children:[br,g.jsx("button",{type:"button",onClick:Mn,className:Qn,children:qn})]}),e[133]=Mn,e[134]=Qn,e[135]=qn,e[136]=Mt):Mt=e[136];let xr;e[137]!==$n||e[138]!==Mt?(xr=g.jsxs("div",{children:[en,g.jsxs("div",{className:"flex flex-col gap-3",children:[$n,Mt]})]}),e[137]=$n,e[138]=Mt,e[139]=xr):xr=e[139];let Di,jn,Zn;e[140]===Symbol.for("react.memo_cache_sentinel")?(Di=g.jsx(Eo,{}),jn=g.jsx(ki,{className:"text-sm font-medium",children:"Color Scheme"}),Zn=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose your preferred color palette"}),e[140]=Di,e[141]=jn,e[142]=Zn):(Di=e[140],jn=e[141],Zn=e[142]);let Sr;e[143]!==_||e[144]!==k?(Sr=g.jsxs("div",{children:[jn,Zn,g.jsxs("div",{className:"grid grid-cols-5 gap-2",children:[g.jsx(Eu,{scheme:"neutral",currentScheme:_,onClick:k}),g.jsx(Eu,{scheme:"ocean",currentScheme:_,onClick:k}),g.jsx(Eu,{scheme:"forest",currentScheme:_,onClick:k}),g.jsx(Eu,{scheme:"sunset",currentScheme:_,onClick:k}),g.jsx(Eu,{scheme:"amethyst",currentScheme:_,onClick:k})]})]}),e[143]=_,e[144]=k,e[145]=Sr):Sr=e[145],e[146]!==Jt||e[147]!==xr||e[148]!==Sr?(W=g.jsx(ku,{value:"appearance",className:"mt-4",children:g.jsxs("div",{className:"flex flex-col gap-4",children:[Jt,Nt,xr,Di,Sr]})}),e[146]=Jt,e[147]=xr,e[148]=Sr,e[149]=W):W=e[149],rt=ku,ce="permissions",xe="mt-4",it="flex flex-col gap-4";let Jn;e[150]===Symbol.for("react.memo_cache_sentinel")?(Jn=g.jsxs("div",{children:[g.jsx(ki,{className:"text-sm font-medium",children:"Always-allowed Operations"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Tools you've approved to run without asking"})]}),e[150]=Jn):Jn=e[150];let Vr;e[151]===Symbol.for("react.memo_cache_sentinel")?(Vr=g.jsx(Gl,{className:"size-4"}),e[151]=Vr):Vr=e[151];let wr;e[152]!==l?(wr=g.jsx(ze,{variant:"outline",size:"icon",onClick:l,className:"size-8",children:Vr}),e[152]=l,e[153]=wr):wr=e[153];const Cr=je.length>0&&g.jsxs(ze,{variant:"destructive",size:"sm",onClick:()=>A(!0),children:[g.jsx(ac,{className:"size-4","data-icon":"inline-start"}),"Revoke All"]});e[154]!==wr||e[155]!==Cr?(Ze=g.jsxs("div",{className:"flex items-center justify-between",children:[Jn,g.jsxs("div",{className:"flex gap-2",children:[wr,Cr]})]}),e[154]=wr,e[155]=Cr,e[156]=Ze):Ze=e[156],e[157]===Symbol.for("react.memo_cache_sentinel")?(dt=g.jsx(Eo,{}),e[157]=dt):dt=e[157],Ae=yc,Je="h-[300px]",Qe=je.length===0&&Ve.length===0&&g.jsxs("div",{className:"text-center py-8 text-muted-foreground text-sm",children:["No permissions granted yet.",g.jsx("br",{}),'Approve tool requests with "Always allow" to add them here.']}),ot=je.length>0&&g.jsxs("div",{className:"mb-4",children:[g.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Active (",je.length,")"]}),je.map(er=>g.jsx(Rx,{permission:er,onRevoke:u},er.id))]}),ue=Ve.length>0&&g.jsxs("div",{children:[g.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Revoked (",Ve.length,")"]}),Ve.map(er=>g.jsx(Rx,{permission:er,onRevoke:u},er.id))]}),e[37]=d,e[38]=S,e[39]=b,e[40]=C,e[41]=f,e[42]=i,e[43]=v,e[44]=l,e[45]=u,e[46]=n,e[47]=w,e[48]=o,e[49]=_,e[50]=x,e[51]=k,e[52]=O,e[53]=B,e[54]=q,e[55]=Ae,e[56]=rt,e[57]=G,e[58]=Y,e[59]=Q,e[60]=I,e[61]=Je,e[62]=Qe,e[63]=ot,e[64]=ue,e[65]=it,e[66]=Ze,e[67]=dt,e[68]=ce,e[69]=xe,e[70]=F,e[71]=J,e[72]=ne,e[73]=Z,e[74]=W}else O=e[52],B=e[53],q=e[54],Ae=e[55],rt=e[56],G=e[57],Y=e[58],Q=e[59],I=e[60],Je=e[61],Qe=e[62],ot=e[63],ue=e[64],it=e[65],Ze=e[66],dt=e[67],ce=e[68],xe=e[69],F=e[70],J=e[71],ne=e[72],Z=e[73],W=e[74];let pe;e[158]!==Ae||e[159]!==Je||e[160]!==Qe||e[161]!==ot||e[162]!==ue?(pe=g.jsxs(Ae,{className:Je,children:[Qe,ot,ue]}),e[158]=Ae,e[159]=Je,e[160]=Qe,e[161]=ot,e[162]=ue,e[163]=pe):pe=e[163];let Me;e[164]!==it||e[165]!==Ze||e[166]!==dt||e[167]!==pe?(Me=g.jsxs("div",{className:it,children:[Ze,dt,pe]}),e[164]=it,e[165]=Ze,e[166]=dt,e[167]=pe,e[168]=Me):Me=e[168],e[169]!==rt||e[170]!==ce||e[171]!==xe||e[172]!==Me?(V=g.jsx(rt,{value:ce,className:xe,children:Me}),e[169]=rt,e[170]=ce,e[171]=xe,e[172]=Me,e[173]=V):V=e[173];let Le;e[174]===Symbol.for("react.memo_cache_sentinel")?(Le=g.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Connect subscription-based providers to use models without API keys."}),e[174]=Le):Le=e[174];let nt;if(e[175]!==h||e[176]!==y||e[177]!==p){let je;e[179]!==h||e[180]!==y?(je=Ve=>g.jsx(RF,{provider:Ve,onConnect:()=>h(Ve.provider),onDisconnect:()=>y(Ve.provider)},Ve.provider),e[179]=h,e[180]=y,e[181]=je):je=e[181],nt=p.map(je),e[175]=h,e[176]=y,e[177]=p,e[178]=nt}else nt=e[178];e[182]!==nt?(K=g.jsx(ku,{value:"providers",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[Le,g.jsx("div",{className:"flex flex-col gap-3",children:nt})]})})}),e[182]=nt,e[183]=K):K=e[183],j=ku,z="keybinds",H="mt-4",$="flex flex-col gap-2",L=Ke.map(jF),e[0]=d,e[1]=S,e[2]=b,e[3]=C,e[4]=h,e[5]=y,e[6]=f,e[7]=i,e[8]=v,e[9]=l,e[10]=u,e[11]=n,e[12]=w,e[13]=o,e[14]=p,e[15]=_,e[16]=x,e[17]=k,e[18]=j,e[19]=O,e[20]=B,e[21]=q,e[22]=$,e[23]=V,e[24]=K,e[25]=G,e[26]=Y,e[27]=Q,e[28]=I,e[29]=L,e[30]=z,e[31]=H,e[32]=F,e[33]=J,e[34]=ne,e[35]=Z,e[36]=W}else j=e[18],O=e[19],B=e[20],q=e[21],$=e[22],V=e[23],K=e[24],G=e[25],Y=e[26],Q=e[27],I=e[28],L=e[29],z=e[30],H=e[31],F=e[32],J=e[33],ne=e[34],Z=e[35],W=e[36];let U;e[184]!==$||e[185]!==L?(U=g.jsx("div",{className:$,children:L}),e[184]=$,e[185]=L,e[186]=U):U=e[186];let te;e[187]!==j||e[188]!==U||e[189]!==z||e[190]!==H?(te=g.jsx(j,{value:z,className:H,children:U}),e[187]=j,e[188]=U,e[189]=z,e[190]=H,e[191]=te):te=e[191];let ie;e[192]!==O||e[193]!==V||e[194]!==K||e[195]!==te||e[196]!==F||e[197]!==J||e[198]!==ne||e[199]!==Z||e[200]!==W?(ie=g.jsxs(O,{defaultValue:F,className:J,children:[ne,Z,W,V,K,te]}),e[192]=O,e[193]=V,e[194]=K,e[195]=te,e[196]=F,e[197]=J,e[198]=ne,e[199]=Z,e[200]=W,e[201]=ie):ie=e[201];let ae;e[202]!==B||e[203]!==G||e[204]!==Y||e[205]!==ie?(ae=g.jsxs(B,{className:G,children:[Y,ie]}),e[202]=B,e[203]=G,e[204]=Y,e[205]=ie,e[206]=ae):ae=e[206];let se;e[207]!==a?(se=()=>{a(),A(!1)},e[207]=a,e[208]=se):se=e[208];let _e;e[209]!==N||e[210]!==se?(_e=g.jsx(AF,{open:N,onOpenChange:A,title:"Revoke All Permissions",description:"This will revoke all always-allowed permissions for this workspace. You'll need to approve these tools again when they're used.",confirmLabel:"Revoke All",variant:"destructive",onConfirm:se}),e[209]=N,e[210]=se,e[211]=_e):_e=e[211];let Te;return e[212]!==q||e[213]!==Q||e[214]!==I||e[215]!==ae||e[216]!==_e?(Te=g.jsxs(q,{open:Q,onOpenChange:I,children:[ae,_e]}),e[212]=q,e[213]=Q,e[214]=I,e[215]=ae,e[216]=_e,e[217]=Te):Te=e[217],Te}function jF(t,e){return g.jsxs("div",{className:"flex items-center justify-between py-1",children:[g.jsx("div",{className:"flex items-center gap-1",children:t.keys.map((n,i)=>g.jsxs("span",{children:[g.jsx("kbd",{className:"font-mono bg-muted rounded px-2 py-1 text-xs",children:n}),i<t.keys.length-1&&g.jsx("span",{className:"mx-1 text-muted-foreground",children:"+"})]},i))}),g.jsx("span",{className:"text-sm text-muted-foreground",children:t.description})]},e)}function OF(t){return t.revokedAt}function LF(t){return!t.revokedAt}function IF(t){const e=ve.c(6),{status:n}=t;switch(n.status){case"connected":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"default",className:"bg-green-600",children:[g.jsx(Gu,{className:"size-3 mr-1"}),"Connected"]}),e[0]=i):i=e[0],i}case"disabled":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"secondary",children:[g.jsx(ih,{className:"size-3 mr-1"}),"Disabled"]}),e[1]=i):i=e[1],i}case"failed":{let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"destructive",children:[g.jsx(Nu,{className:"size-3 mr-1"}),"Failed"]}),e[2]=i):i=e[2],i}case"needs_auth":{let i;return e[3]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"outline",className:"border-yellow-500 text-yellow-600",children:[g.jsx(Nu,{className:"size-3 mr-1"}),"Needs Auth"]}),e[3]=i):i=e[3],i}case"needs_client_registration":{let i;return e[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Kn,{variant:"outline",className:"border-orange-500 text-orange-600",children:[g.jsx(Nu,{className:"size-3 mr-1"}),"Needs Registration"]}),e[4]=i):i=e[4],i}default:{let i;return e[5]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(Kn,{variant:"secondary",children:"Unknown"}),e[5]=i):i=e[5],i}}}function BF({open:t,onOpenChange:e,workspaceId:n,workspacePath:i,serverUrl:o,apiToken:l}){const{fetchWithAuth:u}=od(),[a,d]=D.useState({}),[f,p]=D.useState(!1),[h,y]=D.useState(null),[S,C]=D.useState(null),w=D.useCallback(async()=>{if(n){p(!0),C(null);try{const k=await u(`/api/workspaces/${n}/mcp/status`,{},{serverUrl:o,token:l});if(!k.ok)throw new Error("Failed to load MCP status");const N=await k.json();d(N.status||{})}catch(k){const N=k instanceof Error?k.message:"Unknown error";C(N)}finally{p(!1)}}},[n,u,o,l]);D.useEffect(()=>{t&&n&&w()},[t,n,w]);const v=async k=>{if(n){y(k);try{if(!(await u(`/api/workspaces/${n}/mcp/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k})},{serverUrl:o,token:l})).ok)throw new Error("Failed to connect");await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{y(null)}}},b=async k=>{if(n){y(k);try{if(!(await u(`/api/workspaces/${n}/mcp/disconnect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k})},{serverUrl:o,token:l})).ok)throw new Error("Failed to disconnect");await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{y(null)}}},_=async k=>{if(n){y(k);try{const N=await u(`/api/workspaces/${n}/mcp/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k})},{serverUrl:o,token:l});if(!N.ok)throw new Error("Failed to start auth");const A=await N.json();A.authorizationUrl&&window.open(A.authorizationUrl,"_blank"),await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{y(null)}}},x=Object.entries(a);return g.jsx(mc,{open:t,onOpenChange:e,children:g.jsxs(gc,{className:"sm:max-w-[600px] max-h-[80vh]",children:[g.jsxs(vc,{children:[g.jsxs(_c,{className:"flex items-center gap-2",children:[g.jsx(Na,{className:"size-5"}),"MCP Servers"]}),g.jsx(ad,{children:"Manage Model Context Protocol servers for this workspace"})]}),g.jsxs("div",{className:"mt-4 space-y-4",children:[S&&g.jsxs(Df,{variant:"destructive",children:[g.jsx(Nu,{className:"size-4"}),g.jsx(Mf,{children:S})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Configure servers in ",g.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:".jean2/mcp.json"})]}),g.jsx(ze,{variant:"outline",size:"sm",onClick:w,disabled:f,children:g.jsx(Gl,{className:`size-4 ${f?"animate-spin":""}`})})]}),g.jsx(yc,{className:"h-[400px]",children:f&&x.length===0?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsx(Br,{className:"size-6 animate-spin text-muted-foreground"})}):x.length===0?g.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[g.jsx(Na,{className:"size-12 mx-auto mb-3 opacity-50"}),g.jsx("p",{className:"font-medium",children:"No MCP servers configured"}),g.jsxs("p",{className:"text-sm mt-1",children:["Create ",g.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:".jean2/mcp.json"})," in your workspace to add servers."]})]}):g.jsx("div",{className:"space-y-3",children:x.map(([k,{config:N,status:A}])=>{var M;return g.jsxs("div",{className:"border rounded-lg p-4",children:[g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(Na,{className:"size-5 text-muted-foreground mt-0.5"}),g.jsxs("div",{children:[g.jsx("div",{className:"font-medium",children:k}),g.jsx("div",{className:"text-sm text-muted-foreground",children:(N==null?void 0:N.type)==="local"?g.jsxs("span",{children:["Local - ",((M=N.command)==null?void 0:M[0])||"command"]}):(N==null?void 0:N.type)==="remote"?g.jsxs("span",{className:"flex items-center gap-1",children:["Remote - ",N.url]}):"Unknown type"}),A.status==="failed"&&"error"in A&&g.jsx(Df,{variant:"destructive",className:"mt-2 py-2",children:g.jsx(Mf,{className:"text-xs",children:A.error})}),A.status==="needs_client_registration"&&"error"in A&&g.jsx(Df,{className:"mt-2 py-2 border-orange-500",children:g.jsx(Mf,{className:"text-xs",children:A.error})})]})]}),g.jsx("div",{className:"flex items-center gap-2",children:g.jsx(IF,{status:A})})]}),g.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t",children:[A.status==="connected"&&g.jsxs(ze,{variant:"outline",size:"sm",onClick:()=>b(k),disabled:h===k,children:[h===k?g.jsx(Br,{className:"size-4 animate-spin"}):g.jsx(Y4,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Disconnect"})]}),(A.status==="disabled"||A.status==="failed")&&g.jsxs(ze,{variant:"outline",size:"sm",onClick:()=>v(k),disabled:h===k,children:[h===k?g.jsx(Br,{className:"size-4 animate-spin"}):g.jsx(Q4,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Connect"})]}),A.status==="needs_auth"&&g.jsxs(ze,{variant:"default",size:"sm",onClick:()=>_(k),disabled:h===k,children:[h===k?g.jsx(Br,{className:"size-4 animate-spin"}):g.jsx(kg,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Authenticate"})]})]})]},k)})})})]})]})})}function Tx(t){const e=ve.c(3),{message:n}=t,i=n===void 0?"Connecting to server...":n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(Br,{className:"size-8 animate-spin"}),e[0]=o):o=e[0];let l;return e[1]!==i?(l=g.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 text-muted-foreground",children:[o,g.jsx("p",{className:"text-sm",children:i})]}),e[1]=i,e[2]=l):l=e[2],l}const zF=t=>{const e=ve.c(26),{serverUrl:n,authError:i,retryCount:o,nextRetryIn:l,onRetry:u,onLogout:a}=t;let d,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(Kx,{className:"size-12 text-destructive mb-4"}),f=g.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Unable to connect to server"}),e[0]=d,e[1]=f):(d=e[0],f=e[1]);const p=i||"Please check that the server is running.";let h;e[2]!==p?(h=g.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-[400px]",children:p}),e[2]=p,e[3]=h):h=e[3];let y;e[4]!==n?(y=n&&g.jsx("p",{className:"text-xs text-muted-foreground mb-6 font-mono bg-muted px-3 py-1.5 rounded",children:n}),e[4]=n,e[5]=y):y=e[5];let S;e[6]!==l?(S=g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Retrying in ",l,"s..."]}),e[6]=l,e[7]=S):S=e[7];let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(Gl,{className:"size-4 mr-2","data-icon":"inline-start"}),e[8]=C):C=e[8];let w;e[9]!==u?(w=g.jsxs(ze,{onClick:u,variant:"default",children:[C,"Retry Now"]}),e[9]=u,e[10]=w):w=e[10];let v;e[11]!==a?(v=g.jsx(ze,{onClick:a,variant:"ghost",children:"Change Server"}),e[11]=a,e[12]=v):v=e[12];let b;e[13]!==w||e[14]!==v?(b=g.jsxs("div",{className:"flex items-center gap-2",children:[w,v]}),e[13]=w,e[14]=v,e[15]=b):b=e[15];let _;e[16]!==o?(_=o>0&&g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retry attempt: ",o]}),e[16]=o,e[17]=_):_=e[17];let x;e[18]!==b||e[19]!==_||e[20]!==S?(x=g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[S,b,_]}),e[18]=b,e[19]=_,e[20]=S,e[21]=x):x=e[21];let k;return e[22]!==x||e[23]!==h||e[24]!==y?(k=g.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] px-4 text-center",children:[d,f,h,y,x]}),e[22]=x,e[23]=h,e[24]=y,e[25]=k):k=e[25],k};function Nx(t){const e=ve.c(40),{onServerAdded:n,error:i}=t,[o,l]=D.useState(""),[u,a]=D.useState("localhost:8742"),[d,f]=D.useState(""),[p,h]=D.useState(!1),[y,S]=D.useState(null);let C;e[0]!==o||e[1]!==n||e[2]!==d||e[3]!==u?(C=I=>{I.preventDefault();const L=o.trim(),z=u.trim(),H=d.trim();if(!L){S("Please enter a server name");return}if(!z){S("Please enter a server URL");return}if(!H){S("Please enter an API token");return}if(!Xx(H)){S("Invalid token format. Token should be 64 hex characters (0-9, a-f).");return}const F=Of(z),J={id:crypto.randomUUID(),name:L,url:F,token:H,createdAt:new Date().toISOString()};n(J)},e[0]=o,e[1]=n,e[2]=d,e[3]=u,e[4]=C):C=e[4];const w=C;let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsxs("div",{className:"px-6 pt-6 pb-4 text-center border-b border-border",children:[g.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Add your first server"}),g.jsx("p",{className:"text-muted-foreground mt-1",children:"Connect to a Jean2 server to get started"})]}),e[5]=v):v=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=g.jsx("label",{htmlFor:"serverName",className:"text-sm font-medium text-foreground",children:"Server Name"}),e[6]=b):b=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=I=>{l(I.target.value),S(null)},e[7]=_):_=e[7];let x;e[8]!==o?(x=g.jsxs("div",{className:"space-y-2",children:[b,g.jsx("input",{id:"serverName",type:"text",value:o,onChange:_,placeholder:"Production",className:"w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"})]}),e[8]=o,e[9]=x):x=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=g.jsx("label",{htmlFor:"serverUrl",className:"text-sm font-medium text-foreground",children:"Server URL"}),e[10]=k):k=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=I=>{a(I.target.value),S(null)},e[11]=N):N=e[11];let A;e[12]!==u?(A=g.jsxs("div",{className:"space-y-2",children:[k,g.jsx("input",{id:"serverUrl",type:"text",value:u,onChange:N,placeholder:"localhost:8742",className:"w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"})]}),e[12]=u,e[13]=A):A=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx("label",{htmlFor:"token",className:"text-sm font-medium text-foreground",children:"API Token"}),e[14]=M):M=e[14];const R=p?"text":"password";let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=I=>{f(I.target.value),S(null)},e[15]=j):j=e[15];let O;e[16]!==R||e[17]!==d?(O=g.jsx("input",{id:"token",type:R,value:d,onChange:j,placeholder:"Enter your 64-character token",className:"w-full px-3 py-2 pr-10 bg-background border border-input rounded-lg text-foreground font-mono text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"}),e[16]=R,e[17]=d,e[18]=O):O=e[18];let B;e[19]!==p?(B=()=>h(!p),e[19]=p,e[20]=B):B=e[20];const q=p?"Hide token":"Show token";let $;e[21]!==p?($=p?g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):g.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),e[21]=p,e[22]=$):$=e[22];let V;e[23]!==B||e[24]!==q||e[25]!==$?(V=g.jsx("button",{type:"button",onClick:B,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground transition-colors","aria-label":q,children:$}),e[23]=B,e[24]=q,e[25]=$,e[26]=V):V=e[26];let K;e[27]!==O||e[28]!==V?(K=g.jsxs("div",{className:"space-y-2",children:[M,g.jsxs("div",{className:"relative",children:[O,V]})]}),e[27]=O,e[28]=V,e[29]=K):K=e[29];let G;e[30]!==i||e[31]!==y?(G=(y||i)&&g.jsx("div",{className:"px-3 py-2 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm",children:y||i}),e[30]=i,e[31]=y,e[32]=G):G=e[32];let Y;e[33]===Symbol.for("react.memo_cache_sentinel")?(Y=g.jsx("button",{type:"submit",className:"w-full py-2.5 bg-primary text-primary-foreground font-medium rounded-lg hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 transition-colors",children:"Add Server"}),e[33]=Y):Y=e[33];let Q;return e[34]!==w||e[35]!==K||e[36]!==G||e[37]!==x||e[38]!==A?(Q=g.jsx("div",{className:"w-full h-full flex items-center justify-center bg-background dark:bg-gradient-to-br dark:from-muted dark:via-background dark:to-muted p-4",children:g.jsx("div",{className:"w-full max-w-md",children:g.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-2xl overflow-hidden",children:[v,g.jsxs("form",{onSubmit:w,className:"p-6 space-y-4",children:[x,A,K,G,Y]})]})})}),e[34]=w,e[35]=K,e[36]=G,e[37]=x,e[38]=A,e[39]=Q):Q=e[39],Q}function Dx(t){const e=ve.c(17),{onServerSwitch:n,onSelectWorkspace:i}=t,[o,l]=D.useState(!1),u=D.useRef(!1),a=cd(),{quickConnections:d,switchServer:f,removeFromQuickConnections:p,isSwitching:h}=lc(),y=O=>{f(O.serverId)&&(u.current=!0,n==null||n(),O.workspaceId&&i&&i(O.workspaceId))};let S,C;e[0]!==h||e[1]!==o?(S=()=>{!h&&o&&u.current&&(l(!1),u.current=!1)},C=[h,o],e[0]=h,e[1]=o,e[2]=S,e[3]=C):(S=e[2],C=e[3]),D.useEffect(S,C);let w;e[4]!==p?(w=(O,B)=>{O.stopPropagation(),p(B)},e[4]=p,e[5]=w):w=e[5];const v=w,b=()=>g.jsx(G1,{children:g.jsx(K1,{className:"max-h-[50vh] overflow-y-auto",children:d.length>0?g.jsx(Fu,{heading:"Quick Switch",children:d.map(O=>g.jsxs(Xl,{onSelect:()=>y(O),className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Na,{className:"size-4 text-muted-foreground"}),g.jsxs("span",{children:[O.serverName,O.workspaceName&&g.jsxs("span",{className:"text-muted-foreground",children:[" / ",O.workspaceName]})]})]}),g.jsx("button",{className:"opacity-0 group-hover:opacity-100 hover:opacity-100 transition-opacity p-1 rounded hover:bg-destructive/10",onClick:B=>v(B,O.id),children:g.jsx(ac,{className:"size-3 text-destructive"})})]},O.id))}):g.jsx(Y1,{className:"py-6",children:g.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[g.jsx(Bm,{className:"size-8"}),g.jsx("p",{className:"text-sm font-medium",children:"No favorites yet"}),g.jsx("p",{className:"text-xs",children:"Star a workspace to add it here"})]})})})});if(a){let O;e[6]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(F8,{asChild:!0,children:g.jsx(ze,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Bm,{className:"size-4"})})}),e[6]=O):O=e[6];let B;return e[7]===Symbol.for("react.memo_cache_sentinel")?(B=g.jsx(zh,{children:g.jsx(Ph,{children:"Quick Switch"})}),e[7]=B):B=e[7],g.jsxs(Ih,{open:o,onOpenChange:l,children:[O,g.jsxs(Bh,{side:"bottom",className:"max-h-[80vh]",children:[B,g.jsx("div",{className:"mt-4",children:b()})]})]})}const _=Oh;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=g.jsx(X1,{asChild:!0,children:g.jsx(ze,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Bm,{className:"size-4"})})}),e[8]=x):x=e[8];const k=Lh,N="w-[300px] p-0",A="start",M=b();let R;e[9]!==k||e[10]!==M?(R=g.jsx(k,{className:N,align:A,children:M}),e[9]=k,e[10]=M,e[11]=R):R=e[11];let j;return e[12]!==_||e[13]!==o||e[14]!==x||e[15]!==R?(j=g.jsxs(_,{open:o,onOpenChange:l,children:[x,R]}),e[12]=_,e[13]=o,e[14]=x,e[15]=R,e[16]=j):j=e[16],j}function Mx(t){const e=ve.c(13),{viewMode:n,onViewModeChange:i}=t;let o;e[0]!==i||e[1]!==n?(o=()=>{i(n==="overview"?"default":"overview")},e[0]=i,e[1]=n,e[2]=o):o=e[2];const l=o,u=n==="overview";let a;e[3]!==u?(a=u?g.jsx(R4,{className:"h-4 w-4"}):g.jsx(E4,{className:"h-4 w-4"}),e[3]=u,e[4]=a):a=e[4];let d;e[5]!==a||e[6]!==l?(d=g.jsx(Uu,{asChild:!0,children:g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:l,children:a})}),e[5]=a,e[6]=l,e[7]=d):d=e[7];const f=u?"Single workspace":"Overview";let p;e[8]!==f?(p=g.jsx($u,{children:f}),e[8]=f,e[9]=p):p=e[9];let h;return e[10]!==d||e[11]!==p?(h=g.jsx(Gf,{children:g.jsxs(Hu,{children:[d,p]})}),e[10]=d,e[11]=p,e[12]=h):h=e[12],h}function PF(t){const e=ve.c(70),{open:n,onOpenChange:i,editServer:o}=t,{prepareForServerAdd:l,addServer:u,editServer:a}=lc(),[d,f]=D.useState(""),[p,h]=D.useState(""),[y,S]=D.useState(""),[C,w]=D.useState(!1),[v,b]=D.useState(null),_=o!=null;let x;e[0]!==o?(x=()=>{o?(f(o.name),h(o.url),S(o.token)):(f(""),h("localhost:8742"),S("")),b(null),w(!1)},e[0]=o,e[1]=x):x=e[1];let k;e[2]!==o||e[3]!==n?(k=[o,n],e[2]=o,e[3]=n,e[4]=k):k=e[4],D.useEffect(x,k);let N;e[5]!==u||e[6]!==o||e[7]!==_||e[8]!==d||e[9]!==i||e[10]!==l||e[11]!==y||e[12]!==a||e[13]!==p?(N=De=>{De.preventDefault(),b(null);const Ke=d.trim(),Ae=p.trim(),rt=y.trim();if(!Ke){b("Name is required");return}if(!Ae){b("Server URL is required");return}if(!rt){b("API token is required");return}if(!Xx(rt)){b("Token must be 64 hexadecimal characters");return}const Je=Of(Ae);_?a(o.id,{name:Ke,url:Je,token:rt}):(l(),u(Ke,Je,rt)),i(!1)},e[5]=u,e[6]=o,e[7]=_,e[8]=d,e[9]=i,e[10]=l,e[11]=y,e[12]=a,e[13]=p,e[14]=N):N=e[14];const A=N,M=_?"Edit Server":"Add Server";let R;e[15]!==M?(R=g.jsx(_c,{children:M}),e[15]=M,e[16]=R):R=e[16];const j=_?"Update server details":"Enter your server details";let O;e[17]!==j?(O=g.jsx(ad,{children:j}),e[17]=j,e[18]=O):O=e[18];let B;e[19]!==R||e[20]!==O?(B=g.jsxs(vc,{children:[R,O]}),e[19]=R,e[20]=O,e[21]=B):B=e[21];let q;e[22]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(ki,{htmlFor:"server-name",children:"Name"}),e[22]=q):q=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=De=>f(De.target.value),e[23]=$):$=e[23];let V;e[24]!==d?(V=g.jsxs("div",{className:"grid gap-2",children:[q,g.jsx(Nf,{id:"server-name",value:d,onChange:$,placeholder:"My Server"})]}),e[24]=d,e[25]=V):V=e[25];let K;e[26]===Symbol.for("react.memo_cache_sentinel")?(K=g.jsx(ki,{htmlFor:"server-url",children:"Server URL"}),e[26]=K):K=e[26];let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=De=>h(De.target.value),e[27]=G):G=e[27];let Y;e[28]!==p?(Y=g.jsxs("div",{className:"grid gap-2",children:[K,g.jsx(Nf,{id:"server-url",value:p,onChange:G,placeholder:"localhost:8742"})]}),e[28]=p,e[29]=Y):Y=e[29];let Q;e[30]===Symbol.for("react.memo_cache_sentinel")?(Q=g.jsx(ki,{htmlFor:"server-token",children:"API Token"}),e[30]=Q):Q=e[30];const I=C?"text":"password";let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=De=>S(De.target.value),e[31]=L):L=e[31];let z;e[32]!==I||e[33]!==y?(z=g.jsx(Nf,{id:"server-token",type:I,value:y,onChange:L,placeholder:"64-character hex string",className:"pr-10"}),e[32]=I,e[33]=y,e[34]=z):z=e[34];let H;e[35]!==C?(H=()=>w(!C),e[35]=C,e[36]=H):H=e[36];let F;e[37]!==C?(F=C?g.jsx(u4,{className:"size-4 text-muted-foreground"}):g.jsx(f4,{className:"size-4 text-muted-foreground"}),e[37]=C,e[38]=F):F=e[38];let J;e[39]!==H||e[40]!==F?(J=g.jsx("button",{type:"button",onClick:H,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-transparent",children:F}),e[39]=H,e[40]=F,e[41]=J):J=e[41];let ne;e[42]!==z||e[43]!==J?(ne=g.jsxs("div",{className:"grid gap-2",children:[Q,g.jsxs("div",{className:"relative",children:[z,J]})]}),e[42]=z,e[43]=J,e[44]=ne):ne=e[44];let Z;e[45]!==v?(Z=v&&g.jsx("p",{className:"text-sm text-destructive",children:v}),e[45]=v,e[46]=Z):Z=e[46];let W;e[47]!==V||e[48]!==Y||e[49]!==ne||e[50]!==Z?(W=g.jsxs("div",{className:"grid gap-4 py-4",children:[V,Y,ne,Z]}),e[47]=V,e[48]=Y,e[49]=ne,e[50]=Z,e[51]=W):W=e[51];let U;e[52]!==i?(U=g.jsx(ze,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),e[52]=i,e[53]=U):U=e[53];const te=_?"Save":"Add";let ie;e[54]!==te?(ie=g.jsx(ze,{type:"submit",children:te}),e[54]=te,e[55]=ie):ie=e[55];let ae;e[56]!==U||e[57]!==ie?(ae=g.jsxs(Mh,{children:[U,ie]}),e[56]=U,e[57]=ie,e[58]=ae):ae=e[58];let se;e[59]!==A||e[60]!==W||e[61]!==ae?(se=g.jsxs("form",{onSubmit:A,children:[W,ae]}),e[59]=A,e[60]=W,e[61]=ae,e[62]=se):se=e[62];let _e;e[63]!==se||e[64]!==B?(_e=g.jsxs(gc,{className:"sm:max-w-[425px]",children:[B,se]}),e[63]=se,e[64]=B,e[65]=_e):_e=e[65];let Te;return e[66]!==i||e[67]!==n||e[68]!==_e?(Te=g.jsx(mc,{open:n,onOpenChange:i,children:_e}),e[66]=i,e[67]=n,e[68]=_e,e[69]=Te):Te=e[69],Te}const FF=400,HF=typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window);function UF(){const t=['[data-slot="dialog-overlay"][data-state="open"]','[data-slot="dialog-content"][data-state="open"]','[role="dialog"][data-state="open"]'];for(const n of t)if(document.querySelector(n))return!0;const e=document.querySelectorAll('[role="dialog"]');for(const n of e)if(n instanceof HTMLElement&&$F(n))return!0;return!1}function $F(t){if(!t.isConnected)return!1;const e=window.getComputedStyle(t);return e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity)>0&&t.getBoundingClientRect().width>0&&t.getBoundingClientRect().height>0}function qF(){var e,n;const t=document.activeElement;return t?!!((e=t.hasAttribute)!=null&&e.call(t,"data-chat-input")||(n=t.closest)!=null&&n.call(t,'[data-chat-input="true"]')):!1}function VF(t){const e=ve.c(5),n=D.useRef(t);let i;e[0]!==t?(i=()=>{n.current=t},e[0]=t,e[1]=i):i=e[1],D.useLayoutEffect(i);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={lastEscTime:0,armed:!1},e[2]=o):o=e[2];const l=D.useRef(o);let u,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{const d=f=>{if(f.isComposing||f.repeat||f.key==="Escape"&&UF())return;const{onCloseFocusedPanel:p,onFocusChatInput:h,onStopStreaming:y,onOpenSidebar:S,onOpenTerminal:C,onNewWindow:w,onNewSession:v,onToggleViewMode:b}=n.current;if(f.shiftKey&&f.key==="Escape"){f.preventDefault(),p();return}if(f.key==="Escape"&&!f.metaKey&&!f.ctrlKey){const N=qF(),A=Date.now(),{lastEscTime:M,armed:R}=l.current,j=A-M;if(N&&R&&j<FF){f.preventDefault(),l.current={lastEscTime:0,armed:!1},y();return}if(N){l.current={lastEscTime:A,armed:!0};return}f.preventDefault(),h();return}const _=f.target,x=_.tagName==="INPUT"||_.tagName==="TEXTAREA"||_.isContentEditable,k=f.metaKey||f.ctrlKey;if(!(x&&!k)){if(!HF){if(k&&f.code==="Digit1"){f.preventDefault(),S();return}if(k&&f.code==="KeyT"){f.preventDefault(),C();return}}if(k&&f.shiftKey&&f.code==="KeyN"){f.preventDefault(),w();return}if(k&&f.code==="KeyN"){f.preventDefault(),v();return}if(k&&f.code==="KeyO"){f.preventDefault(),b();return}}};return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},a=[],e[3]=u,e[4]=a):(u=e[3],a=e[4]),D.useEffect(u,a)}const WF="/assets/chat-finish-Kb8mnIhV.mp3",GF="/assets/chat-permission-BltPnMpz.mp3";function KF(){const t=ve.c(3),e=D.useRef(null),n=D.useRef(null);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{try{e.current||(e.current=new Audio(WF));const d=e.current;d.currentTime=0,d.play().catch(XF)}catch(d){const f=d,p=f instanceof Error?f.message:String(f);console.debug("Error initializing notification sound:",p)}},t[0]=i):i=t[0];const o=i;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{try{n.current||(n.current=new Audio(GF));const d=n.current;d.currentTime=0,d.play().catch(YF)}catch(d){const f=d,p=f instanceof Error?f.message:String(f);console.debug("Error initializing permission sound:",p)}},t[1]=l):l=t[1];const u=l;let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a={playChatFinishSound:o,playPermissionSound:u},t[2]=a):a=t[2],a}function YF(t){const e=t instanceof Error?t.message:String(t);console.debug("Could not play permission sound:",e)}function XF(t){const e=t instanceof Error?t.message:String(t);console.debug("Could not play notification sound:",e)}const QF=(t,e)=>t&&e?`ws://${e}/ws?token=${t}`:null,wg=t=>t?`http://${t}/api`:null;function ZF(t){const e=ve.c(24),{onNewSession:n,onNewWindow:i,onToggleViewMode:o,onCloseTerminal:l,focusChatInput:u,setTerminalOpen:a,sidebarRef:d,terminalPanelRef:f,onStopStreaming:p}=t,{setOpen:h}=ud();let y;e[0]!==h||e[1]!==d?(y=()=>{h(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var O;(O=d.current)==null||O.focusSessionPanel()})})},e[0]=h,e[1]=d,e[2]=y):y=e[2];const S=y;let C;e[3]!==a||e[4]!==f?(C=()=>{a(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var O;(O=f.current)==null||O.focus()})})},e[3]=a,e[4]=f,e[5]=C):C=e[5];const w=C,v=D.useRef(S);let b;e[6]!==S?(b=()=>{v.current=S},e[6]=S,e[7]=b):b=e[7],D.useLayoutEffect(b);const _=D.useRef(w);let x;e[8]!==w?(x=()=>{_.current=w},e[8]=w,e[9]=x):x=e[9],D.useLayoutEffect(x);let k,N;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=()=>v.current(),N=()=>_.current(),e[10]=k,e[11]=N):(k=e[10],N=e[11]);let A;e[12]!==l||e[13]!==h?(A=()=>{const O=document.activeElement;O!=null&&O.closest("[data-terminal-panel]")?l():O!=null&&O.closest('[data-sidebar="sidebar"]')&&h(!1)},e[12]=l,e[13]=h,e[14]=A):A=e[14];let M;e[15]!==u||e[16]!==n||e[17]!==i||e[18]!==p||e[19]!==o||e[20]!==A?(M={onOpenSidebar:k,onOpenTerminal:N,onNewSession:n,onNewWindow:i,onToggleViewMode:o,onCloseFocusedPanel:A,onFocusChatInput:u,onStopStreaming:p},e[15]=u,e[16]=n,e[17]=i,e[18]=p,e[19]=o,e[20]=A,e[21]=M):M=e[21],VF(M);let R,j;return e[22]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{if(!(typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window)))return;let B=!1;const q=[];return(async()=>{try{const V=await zy("jean2://accelerator/open-sidebar",()=>{v.current()});if(B){V();return}q.push(V)}catch(V){console.error("Failed to register open-sidebar accelerator listener:",V)}try{const V=await zy("jean2://accelerator/open-terminal",()=>{_.current()});if(B){V();return}q.push(V)}catch(V){console.error("Failed to register open-terminal accelerator listener:",V)}})(),()=>{B=!0,q.forEach(JF)}},R=[],e[22]=R,e[23]=j):(R=e[22],j=e[23]),D.useEffect(j,R),null}function JF(t){return t()}function eH(){var Nc,zi,Dc,Mc,jc,pd,md,gd,Oc,Lc,ml;const t=ve.c(416),{servers:e,activeServer:n,addServer:i,removeServer:o,isSwitching:l,clearSwitchingState:u,quickConnections:a,isAddingServerRef:d,prepareForServerAdd:f,removeFromQuickConnectionsByWorkspace:p}=lc();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const[y,S]=D.useState(h);let C;t[1]===Symbol.for("react.memo_cache_sentinel")?(C=[],t[1]=C):C=t[1];const[w,v]=D.useState(C);let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b=[],t[2]=b):b=t[2];const[_,x]=D.useState(b),[k,N]=D.useState(null);let A;t[3]===Symbol.for("react.memo_cache_sentinel")?(A={},t[3]=A):A=t[3];const[M,R]=D.useState(A);let j;t[4]===Symbol.for("react.memo_cache_sentinel")?(j={},t[4]=j):j=t[4];const[O,B]=D.useState(j),[q,$]=D.useState(null),V=D.useRef(null),K=D.useRef(null),G=D.useRef(null),Y=D.useRef(null),Q=D.useRef(null),[I,L]=D.useState(!1);let z;t[5]===Symbol.for("react.memo_cache_sentinel")?(z=[],t[5]=z):z=t[5];const H=D.useRef(z),[F,J]=D.useState(IH);let ne;t[6]===Symbol.for("react.memo_cache_sentinel")?(ne={promptTokens:0,completionTokens:0,totalTokens:0},t[6]=ne):ne=t[6];const[Z,W]=D.useState(ne),[U,te]=D.useState("gpt-4o"),[ie,ae]=D.useState(null);let se;t[7]===Symbol.for("react.memo_cache_sentinel")?(se=[],t[7]=se):se=t[7];const[_e,Te]=D.useState(se),[De,Ke]=D.useState("gpt-4o");let Ae,rt;t[8]!==U||t[9]!==_e||t[10]!==ie?(Ae=()=>{var Re;const ee=(Re=_e.find(Ue=>Ue.id===U))==null?void 0:Re.variants;ie&&ee&&!ee[ie]&&ae(null)},rt=[U,ie,_e],t[8]=U,t[9]=_e,t[10]=ie,t[11]=Ae,t[12]=rt):(Ae=t[11],rt=t[12]),D.useEffect(Ae,rt);let Je;t[13]===Symbol.for("react.memo_cache_sentinel")?(Je=[],t[13]=Je):Je=t[13];const[Qe,ot]=D.useState(Je),[ue,it]=D.useState(null),[Ze,dt]=D.useState(!1),[ce,xe]=D.useState(!1),[pe,Me]=D.useState(!1),[Le,nt]=D.useState(!1),[je,Ve]=D.useState(LH),[ct,Tt]=D.useState(OH),[be,et]=D.useState(jH);let at;t[14]===Symbol.for("react.memo_cache_sentinel")?(at=[],t[14]=at):at=t[14];const[St,Pt]=D.useState(at);let Ft;t[15]===Symbol.for("react.memo_cache_sentinel")?(Ft=[],t[15]=Ft):Ft=t[15];const[Gt,$t]=D.useState(Ft);let Rn;t[16]===Symbol.for("react.memo_cache_sentinel")?(Rn={},t[16]=Rn):Rn=t[16];const[Tn,Zt]=D.useState(Rn);let on;t[17]===Symbol.for("react.memo_cache_sentinel")?(on=[],t[17]=on):on=t[17];const[Kt,Un]=D.useState(on),[oi,ar]=D.useState(null),[ai,Ur]=D.useState(!1),[li,$r]=D.useState(null),[pn,Cn]=D.useState(!1),[Jt,Nt]=D.useState(0),[en,Nn]=D.useState(0),[Dn,ci]=D.useState(0),qr=(Nc=k==null?void 0:k.compacting)!=null?Nc:!1,[yr,$n]=D.useState(!1);let br;t[18]===Symbol.for("react.memo_cache_sentinel")?(br=new Set,t[18]=br):br=t[18];const[Mn,Qn]=D.useState(br);let lr;t[19]===Symbol.for("react.memo_cache_sentinel")?(lr=new Set,t[19]=lr):lr=t[19];const qn=D.useRef(lr),{playChatFinishSound:Mt,playPermissionSound:xr}=KF(),Di=D.useRef(!1);let jn;t[20]===Symbol.for("react.memo_cache_sentinel")?(jn=new Set,t[20]=jn):jn=t[20];const Zn=D.useRef(jn);let Sr;t[21]===Symbol.for("react.memo_cache_sentinel")?(Sr=new Set,t[21]=Sr):Sr=t[21];const Jn=D.useRef(Sr);let Vr,wr;t[22]!==ct||t[23]!==Mt||t[24]!==y||t[25]!==F?(Vr=()=>{if(!Di.current){Zn.current=new Set(F),Di.current=!0;return}const Re=[...Zn.current].filter(Ue=>!F.has(Ue));for(const Ue of Re){if(Jn.current.has(Ue))continue;const Xe=y.find(ge=>ge.id===Ue);if((Xe==null?void 0:Xe.parentId)===null&&ct){Mt();break}}Zn.current=new Set(F);for(const Ue of Re)Jn.current.delete(Ue)},wr=[F,Mt,y,ct],t[22]=ct,t[23]=Mt,t[24]=y,t[25]=F,t[26]=Vr,t[27]=wr):(Vr=t[26],wr=t[27]),D.useEffect(Vr,wr);let Cr,er;t[28]!==je?(Cr=()=>{localStorage.setItem("jean2_sidebar_view",je)},er=[je],t[28]=je,t[29]=Cr,t[30]=er):(Cr=t[29],er=t[30]),D.useEffect(Cr,er);let cr,On;t[31]!==ct?(cr=()=>{localStorage.setItem("jean2_sound_chat_finish_enabled",String(ct))},On=[ct],t[31]=ct,t[32]=cr,t[33]=On):(cr=t[32],On=t[33]),D.useEffect(cr,On);let Ho,Ua;t[34]!==be?(Ho=()=>{localStorage.setItem("jean2_sound_permission_enabled",String(be))},Ua=[be],t[34]=be,t[35]=Ho,t[36]=Ua):(Ho=t[35],Ua=t[36]),D.useEffect(Ho,Ua);const zs=D.useRef(null),Uo=D.useRef(null),$o=D.useRef(null),[,Sc]=D.useState(!1),Pe=(zi=n==null?void 0:n.token)!=null?zi:null,Ye=(Dc=n==null?void 0:n.url)!=null?Dc:null;let qo,Ps;t[37]!==q?(qo=()=>{V.current=q},Ps=[q],t[37]=q,t[38]=qo,t[39]=Ps):(qo=t[38],Ps=t[39]),D.useEffect(qo,Ps);let ui;t[40]!==(k==null?void 0:k.id)?(ui=()=>{var ee;K.current=(ee=k==null?void 0:k.id)!=null?ee:null},t[40]=k==null?void 0:k.id,t[41]=ui):ui=t[41];let Vo;t[42]!==k?(Vo=[k],t[42]=k,t[43]=Vo):Vo=t[43],D.useEffect(ui,Vo);const Wo=D.useRef(null),di=D.useRef(!1);let $a;t[44]!==i||t[45]!==f?($a=ee=>{f(),i(ee.name,ee.url,ee.token)},t[44]=i,t[45]=f,t[46]=$a):$a=t[46];const Go=$a;let Ko;t[47]!==n||t[48]!==o?(Ko=()=>{n&&o(n.id),V.current&&V.current.close(),$(null),L(!1),Cn(!1),Nt(0),Nn(0)},t[47]=n,t[48]=o,t[49]=Ko):Ko=t[49];const an=Ko;let qa;t[50]===Symbol.for("react.memo_cache_sentinel")?(qa=()=>{Nt(MH),Cn(!1),Nn(0)},t[50]=qa):qa=t[50];const Kh=qa;let Ji;t[51]===Symbol.for("react.memo_cache_sentinel")?(Ji=()=>{V.current&&V.current.close(),$(null),L(!1),Cn(!1),Nt(0),Nn(0),S([]),v([]),N(null),R({}),B({}),J(ee=>(Jn.current=new Set(ee),new Set)),W({promptTokens:0,completionTokens:0,totalTokens:0}),te("gpt-4o"),Te([]),ot([]),it(null),Pt([]),$t([]),Zt({}),ci(DH)},t[51]=Ji):Ji=t[51];const tr=Ji;let Fs;t[52]!==(n==null?void 0:n.id)||t[53]!==d?(Fs=()=>{var ee;(n==null?void 0:n.id)!==$o.current&&d.current&&(d.current=!1,$o.current=(ee=n==null?void 0:n.id)!=null?ee:null,tr())},t[52]=n==null?void 0:n.id,t[53]=d,t[54]=Fs):Fs=t[54];let Hs;t[55]!==n||t[56]!==d?(Hs=[n,tr,d],t[55]=n,t[56]=d,t[57]=Hs):Hs=t[57],D.useEffect(Fs,Hs);let fi;t[58]!==Pe||t[59]!==an?(fi=async(ee,Re)=>{const Ue=Re===void 0?{}:Re;if(!Pe)throw new Error("No API token available");const Xe=new Headers(Ue.headers||{});Xe.set("Authorization",`Bearer ${Pe}`);const ge=await fetch(ee,{...Ue,signal:Ue.signal,headers:Xe});if(ge.status===401)throw ar("Authentication failed. Your token may have been regenerated."),an(),new Error("Unauthorized");return ge},t[58]=Pe,t[59]=an,t[60]=fi):fi=t[60];const Yt=fi;let Yo;t[61]!==M||t[62]!==O?(Yo=ee=>{const Re=M[ee]||[],Ue=O[ee]||{};return Re.map(Xe=>({message:Xe,parts:(Ue[Xe.id]||[]).sort(NH)}))},t[61]=M,t[62]=O,t[63]=Yo):Yo=t[63];const Xo=Yo;let Qo;t[64]!==Pe||t[65]!==an||t[66]!==Ye?(Qo=()=>{if(!Pe||!Ye)return;const ee=QF(Pe,Ye);if(!ee)return;const Re=new WebSocket(ee);return Re.onopen=()=>{L(!0),ar(null),Nt(0),Cn(!1),$t([]),K.current&&Re.send(JSON.stringify({type:"session.resume",sessionId:K.current})),Re.send(JSON.stringify({type:"permissions.sync"}))},Re.onclose=Ue=>{L(!1),(Ue.code===1008||Ue.code===401)&&(ar("Authentication failed. Please check your token."),an())},Re.onerror=TH,Re.onmessage=Ue=>{var ge;const Xe=JSON.parse(Ue.data);(ge=Wo.current)==null||ge.call(Wo,Xe)},$(Re),()=>Re.close()},t[64]=Pe,t[65]=an,t[66]=Ye,t[67]=Qo):Qo=t[67];let Mi;t[68]!==Pe||t[69]!==an||t[70]!==Dn||t[71]!==Ye?(Mi=[Pe,Ye,an,Dn],t[68]=Pe,t[69]=an,t[70]=Dn,t[71]=Ye,t[72]=Mi):Mi=t[72],D.useEffect(Qo,Mi);let ur,Us;t[73]!==Pe||t[74]!==I||t[75]!==pn||t[76]!==Ye?(ur=()=>{if(Pe&&Ye&&!I&&!pn){const ee=setTimeout(()=>{I||Cn(!0)},1e4);return()=>clearTimeout(ee)}},Us=[Pe,Ye,I,pn],t[73]=Pe,t[74]=I,t[75]=pn,t[76]=Ye,t[77]=ur,t[78]=Us):(ur=t[77],Us=t[78]),D.useEffect(ur,Us);let ji,kr;t[79]!==Pe||t[80]!==I||t[81]!==pn||t[82]!==Jt||t[83]!==Ye?(ji=()=>{if(pn&&!I&&Pe&&Ye){const ee=Math.min(1e3*Math.pow(2,Jt),3e4);let Re=Math.floor(ee/1e3);Nn(Re);const Ue=setInterval(()=>{Re=Re-1,Nn(Math.max(0,Re))},1e3),Xe=setTimeout(()=>{Nt(RH),ci(AH)},ee);return()=>{clearInterval(Ue),clearTimeout(Xe)}}},kr=[pn,I,Pe,Ye,Jt],t[79]=Pe,t[80]=I,t[81]=pn,t[82]=Jt,t[83]=Ye,t[84]=ji,t[85]=kr):(ji=t[84],kr=t[85]),D.useEffect(ji,kr);let $s,es;t[86]!==Pe||t[87]!==Ye?($s=()=>{const ee=()=>{if(document.visibilityState!=="visible")return;const Re=V.current;!Re||!Pe||!Ye||(Re.readyState===WebSocket.OPEN?(Re.onclose=null,Re.close(),L(!1),Nt(0),Cn(!1),ci(EH)):(Re.readyState===WebSocket.CLOSED||Re.readyState===WebSocket.CLOSING)&&(L(!1),Nt(0),Cn(!1),ci(kH)))};return document.addEventListener("visibilitychange",ee),()=>document.removeEventListener("visibilitychange",ee)},es=[Pe,Ye],t[86]=Pe,t[87]=Ye,t[88]=$s,t[89]=es):($s=t[88],es=t[89]),D.useEffect($s,es);let Zo,ts;t[90]!==Pe||t[91]!==Ye?(Zo=()=>{const ee=()=>{if(!Pe||!Ye)return;const Re=V.current;Re&&Re.readyState===WebSocket.OPEN||(L(!1),Nt(0),Cn(!1),ci(CH))};return window.addEventListener("online",ee),()=>window.removeEventListener("online",ee)},ts=[Pe,Ye],t[90]=Pe,t[91]=Ye,t[92]=Zo,t[93]=ts):(Zo=t[92],ts=t[93]),D.useEffect(Zo,ts);let ns;t[94]!==Pe||t[95]!==u||t[96]!==Yt||t[97]!==Ye?(ns=()=>{var Ue;if(!Pe||!Ye)return;(Ue=zs.current)==null||Ue.abort(),zs.current=new AbortController;const ee=zs.current.signal,Re=wg(Ye);if(Re)return Sc(!0),Promise.all([Yt(`${Re}/sessions`,{signal:ee}).then(wH),Yt(`${Re}/preconfigs`,{signal:ee}).then(SH),Yt(`${Re}/prompts`,{signal:ee}).then(xH),Yt(`${Re}/models`,{signal:ee}).then(bH),Yt(`${Re}/workspaces`,{signal:ee}).then(yH),Yt(`${Re}/providers`,{signal:ee}).then(_H)]).then(Xe=>{const[ge,ke,$e,vt,Xt,Vn]=Xe;S(ge.sessions||[]),v(ke.preconfigs||[]),x($e.prompts||[]),Te(vt.models||[]),Ke(vt.defaultModel||"gpt-4o"),Un(Vn.providers||[]);const gn=Xt.workspaces||[];if(ot(gn),Uo.current){const Wn=gn.find(Pi=>Pi.id===Uo.current);Wn&&it(Wn),Uo.current=null}else{const Wn=localStorage.getItem("activeWorkspaceId"),Pi=gn.find(vn=>vn.id===Wn);it(Pi||gn[0])}u(),Sc(!1)}).catch(Xe=>{var ge;if(Xe.name==="AbortError"){console.log("Fetch aborted due to server switch");return}console.error("Failed to load server data:",Xe),Sc(!1),(ge=Xe.message)!=null&&ge.includes("Unauthorized")||ar("Failed to connect to server")}),()=>{var Xe;(Xe=zs.current)==null||Xe.abort()}},t[94]=Pe,t[95]=u,t[96]=Yt,t[97]=Ye,t[98]=ns):ns=t[98];let Jo;t[99]!==Pe||t[100]!==u||t[101]!==Yt||t[102]!==Dn||t[103]!==Ye?(Jo=[Pe,Ye,Yt,u,Dn],t[99]=Pe,t[100]=u,t[101]=Yt,t[102]=Dn,t[103]=Ye,t[104]=Jo):Jo=t[104],D.useEffect(ns,Jo);let mn,Wr;t[105]!==ue?(mn=()=>{ue&&localStorage.setItem("activeWorkspaceId",ue.id)},Wr=[ue],t[105]=ue,t[106]=mn,t[107]=Wr):(mn=t[106],Wr=t[107]),D.useEffect(mn,Wr);let rs;t[108]!==Yt||t[109]!==Ye?(rs=async(ee,Re,Ue)=>{const Xe=wg(Ye);if(!Xe)return;const $e=(await(await Yt(`${Xe}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ee,path:Re,isVirtual:Ue})})).json()).workspace;return ot(vt=>[...vt,$e]),it($e),N(null),$e},t[108]=Yt,t[109]=Ye,t[110]=rs):rs=t[110];const Gr=rs;let Va;t[111]===Symbol.for("react.memo_cache_sentinel")?(Va=ee=>{it(ee),N(null)},t[111]=Va):Va=t[111];const wc=Va;let qs;t[112]===Symbol.for("react.memo_cache_sentinel")?(qs=ee=>{Uo.current=ee},t[112]=qs):qs=t[112];const Vs=qs;let is;t[113]!==(ue==null?void 0:ue.id)||t[114]!==k||t[115]!==Yt||t[116]!==p||t[117]!==Ye?(is=async ee=>{const Re=wg(Ye);if(!Re)return;const Ue=await Yt(`${Re}/workspaces/${ee}`,{method:"DELETE"});if(!Ue.ok){const ge=await Ue.json().catch(vH);console.error("Failed to delete workspace:",ge.message);return}const{deletedSessions:Xe}=await Ue.json();p(ee),k&&(k.workspaceId===ee||Xe.includes(k.id))&&N(null),S(ge=>ge.filter(ke=>!Xe.includes(ke.id))),R(ge=>{const ke={...ge};return Xe.forEach($e=>delete ke[$e]),ke}),B(ge=>{const ke={...ge};return Xe.forEach($e=>delete ke[$e]),ke}),ot(ge=>{const ke=ge.filter($e=>$e.id!==ee);return(ue==null?void 0:ue.id)===ee&&it(ke[0]||null),ke})},t[113]=ue==null?void 0:ue.id,t[114]=k,t[115]=Yt,t[116]=p,t[117]=Ye,t[118]=is):is=t[118];const Ws=is;let Wa;t[119]!==Gr||t[120]!==Qe.length?(Wa=async()=>{const ee=`Workspace ${Qe.length+1}`,Re=`~/.jean2/workspaces/${crypto.randomUUID()}`;await Gr(ee,Re,!0)},t[119]=Gr,t[120]=Qe.length,t[121]=Wa):Wa=t[121];const ea=Wa;let Ga;t[122]!==Gr?(Ga=async ee=>{const Re=ee.split("/").pop()||ee.split("\\").pop()||"Workspace";await Gr(Re,ee,!1)},t[122]=Gr,t[123]=Ga):Ga=t[123];const ss=Ga;let Ka;t[124]!==(k==null?void 0:k.id)||t[125]!==De||t[126]!==Mn||t[127]!==_e||t[128]!==be||t[129]!==xr?(Ka=ee=>{var Re,Ue,Xe;e:switch(ee.type){case"session.created":{S(ge=>[ee.session,...ge]),di.current&&(N(ee.session),R(ge=>({...ge,[ee.session.id]:[]})),B(ge=>({...ge,[ee.session.id]:{}})),W({promptTokens:0,completionTokens:0,totalTokens:0}),te(ee.session.selectedModel||De),ae((Re=ee.session.selectedVariant)!=null?Re:null),di.current=!1);break e}case"session.resumed":{N(ee.session),Qn($e=>{const vt=new Set($e);return vt.delete(ee.session.id),vt}),ee.isRunning?J($e=>{const vt=new Set($e);return vt.add(ee.session.id),vt}):J($e=>{if($e.has(ee.session.id)){Jn.current.add(ee.session.id);const vt=new Set($e);return vt.delete(ee.session.id),vt}return $e}),ee.messages&&(R($e=>({...$e,[ee.session.id]:ee.messages.map(gH)})),B($e=>{const vt={...$e};vt[ee.session.id]={};for(const Xt of ee.messages)vt[ee.session.id][Xt.message.id]=Xt.parts;return vt})),W((Ue=ee.usage)!=null?Ue:{promptTokens:0,completionTokens:0,totalTokens:0}),te(ee.session.selectedModel||De),ae(ee.session.selectedVariant||null);const ge=ee.session.selectedModel||De,ke=(Xe=_e.find($e=>$e.id===ge))==null?void 0:Xe.variants;ee.session.selectedVariant&&ke&&!ke[ee.session.selectedVariant]&&ae(null);break e}case"message.created":{R(ge=>({...ge,[ee.message.sessionId]:[...ge[ee.message.sessionId]||[],ee.message]})),B(ge=>({...ge,[ee.message.sessionId]:{...ge[ee.message.sessionId],[ee.message.id]:[]}})),"status"in ee.message&&ee.message.status==="streaming"&&(J(ge=>{const ke=new Set(ge);return ke.add(ee.message.sessionId),ke}),Qn(ge=>{const ke=new Set(ge);return ke.delete(ee.message.sessionId),ke}));break e}case"message.updated":{R(ge=>({...ge,[ee.message.sessionId]:(ge[ee.message.sessionId]||[]).map(ke=>ke.id===ee.message.id?ee.message:ke)})),"status"in ee.message&&ee.message.status!=="streaming"&&J(ge=>{if(ge.has(ee.message.sessionId)){const ke=new Set(ge);return ke.delete(ee.message.sessionId),ke}return ge});break e}case"part.created":{B(ge=>{const ke=ge[ee.sessionId]||{},$e=ke[ee.part.messageId]||[];return{...ge,[ee.sessionId]:{...ke,[ee.part.messageId]:[...$e,ee.part]}}});break e}case"part.updated":{B(ge=>{const ke=ge[ee.sessionId]||{},$e=ke[ee.part.messageId]||[];return{...ge,[ee.sessionId]:{...ke,[ee.part.messageId]:$e.map(vt=>vt.id===ee.part.id?ee.part:vt)}}});break e}case"part.append":{Mn.has(ee.sessionId)||J(ge=>{if(!ge.has(ee.sessionId)){const ke=new Set(ge);return ke.add(ee.sessionId),ke}return ge}),B(ge=>{const ke=ge[ee.sessionId]||{};for(const $e of Object.keys(ke)){const vt=ke[$e],Xt=vt.findIndex(Vn=>Vn.id===ee.partId);if(Xt!==-1){const Vn=vt[Xt];if(Vn.type==="text"||Vn.type==="reasoning"){const gn=[...vt];return gn[Xt]={...Vn,text:Vn.text+ee.delta},{...ge,[ee.sessionId]:{...ke,[$e]:gn}}}}}return ge});break e}case"chat.usage":{if(ee.sessionId!==(k==null?void 0:k.id))return;W({promptTokens:ee.usage.promptTokens,completionTokens:ee.usage.completionTokens,totalTokens:ee.usage.totalTokens}),te(ee.model);break e}case"error":{console.error("Server error:",ee.code,ee.message);break e}case"session.closed":{S(ge=>ge.map(ke=>ke.id===ee.sessionId?{...ke,status:"closed"}:ke)),R(ge=>{const ke={...ge};return delete ke[ee.sessionId],ke}),B(ge=>{const ke={...ge};return delete ke[ee.sessionId],ke}),(k==null?void 0:k.id)===ee.sessionId&&N(null);break e}case"session.reopened":{S(ge=>ge.map(ke=>ke.id===ee.session.id?ee.session:ke)),(k==null?void 0:k.id)===ee.session.id&&N(ee.session);break e}case"session.deleted":{S(ge=>ge.filter(ke=>ke.id!==ee.sessionId)),R(ge=>{const ke={...ge};return delete ke[ee.sessionId],ke}),B(ge=>{const ke={...ge};return delete ke[ee.sessionId],ke}),Qn(ge=>{const ke=new Set(ge);return ke.delete(ee.sessionId),ke}),(k==null?void 0:k.id)===ee.sessionId&&N(null);break e}case"session.updated":{S(ge=>ge.map(ke=>ke.id===ee.session.id?ee.session:ke)),(k==null?void 0:k.id)===ee.session.id&&(N(ee.session),ee.session.selectedVariant!==void 0&&ae(ee.session.selectedVariant));break e}case"session.renamed":{S(ge=>ge.map(ke=>ke.id===ee.session.id?ee.session:ke)),(k==null?void 0:k.id)===ee.session.id&&N(ee.session);break e}case"permission.list":{Pt(ee.permissions);break e}case"permissions.sync":{$t(ge=>{const ke=new Set(ge.map(mH)),$e=ee.approvals.filter(vt=>!ke.has(vt.toolCallId)).map(pH);return[...ge,...$e]});break e}case"permission.revoked":{Pt(ge=>ge.map(ke=>ke.id===ee.permissionId?{...ke,revokedAt:new Date().toISOString()}:ke));break e}case"permission.all_revoked":{Pt(hH);break e}case"permission.request":{const ge={toolCallId:ee.toolCallId,sessionId:ee.sessionId,toolName:ee.toolName,args:ee.args,permissionType:ee.permissionType,permissionKey:ee.permissionKey,message:ee.message,details:ee.details,dangerous:ee.dangerous,childSessionId:ee.childSessionId,subagentName:ee.subagentName};$t($e=>[...$e,ge]);const ke=H.current.find($e=>$e.id===ee.sessionId);(ke==null?void 0:ke.parentId)===null&&be&&!qn.current.has(ee.toolCallId)&&(xr(),qn.current.add(ee.toolCallId));break e}case"permission.granted":{$t(ge=>ge.filter(ke=>ke.toolCallId!==ee.toolCallId));break e}case"session.interrupted":{Qn(ge=>new Set(ge).add(ee.sessionId)),Jn.current.add(ee.sessionId),J(ge=>{if(ge.has(ee.sessionId)){const ke=new Set(ge);return ke.delete(ee.sessionId),ke}return ge}),ee.result.cascadedTo.length>0&&console.log(`Session ${ee.sessionId} interrupted. Cascaded to:`,ee.result.cascadedTo);break e}case"queue.list":{Zt(ge=>({...ge,[ee.sessionId]:ee.messages}));break e}case"queue.added":{Zt(ge=>({...ge,[ee.sessionId]:[...ge[ee.sessionId]||[],ee.message]}));break e}case"queue.removed":{Zt(ge=>({...ge,[ee.sessionId]:(ge[ee.sessionId]||[]).filter(ke=>ke.id!==ee.queueId)}));break e}case"queue.sending":{Zt(ge=>({...ge,[ee.sessionId]:(ge[ee.sessionId]||[]).filter(ke=>ke.id!==ee.queueId)}));break e}case"session.reverted":{console.log(`Session reverted to message ${ee.revertedTo.messageId}, removed ${ee.removed.messageIds.length} messages`);break e}case"compaction.complete":{ee.sessionId===(k==null?void 0:k.id)&&$n(!0);break e}case"session.forked":{const{forkedSession:ge,messages:ke}=ee;S($e=>[ge,...$e]),R($e=>({...$e,[ge.id]:ke.map(fH)})),B($e=>{const vt={...$e};vt[ge.id]={};for(const Xt of ke)vt[ge.id][Xt.message.id]=Xt.parts;return vt}),N(ge),W({promptTokens:0,completionTokens:0,totalTokens:0});break e}case"session.state":{R(ge=>({...ge,[ee.sessionId]:ee.messages.map(dH)})),B(ge=>{const ke={...ge};ke[ee.sessionId]={};for(const $e of ee.messages)ke[ee.sessionId][$e.message.id]=$e.parts;return ke}),Jn.current.add(ee.sessionId),J(ge=>{if(ge.has(ee.sessionId)){const ke=new Set(ge);return ke.delete(ee.sessionId),ke}return ge});break e}case"provider.status":{Un(ge=>ge.find($e=>$e.provider===ee.provider)?ge.map($e=>$e.provider===ee.provider?{...$e,connected:ee.connected,authorizationUrl:ee.authorizationUrl,error:ee.error}:$e):[...ge,{provider:ee.provider,connected:ee.connected,authorizationUrl:ee.authorizationUrl,error:ee.error}]);break e}case"provider.connected":Un(ge=>ge.map(ke=>ke.provider===ee.provider?{...ke,connected:ee.connected,connectedAt:ee.connectedAt,accountId:ee.accountId}:ke))}},t[124]=k==null?void 0:k.id,t[125]=De,t[126]=Mn,t[127]=_e,t[128]=be,t[129]=xr,t[130]=Ka):Ka=t[130];const Ya=Ka;let Xa,Qa;t[131]!==y?(Xa=()=>{H.current=y},Qa=[y],t[131]=y,t[132]=Xa,t[133]=Qa):(Xa=t[132],Qa=t[133]),D.useLayoutEffect(Xa,Qa);let Za,ta;t[134]!==Ya?(Za=()=>{Wo.current=Ya},ta=[Ya],t[134]=Ya,t[135]=Za,t[136]=ta):(Za=t[135],ta=t[136]),D.useEffect(Za,ta);let Ja;t[137]!==q?(Ja=(ee,Re)=>{q&&q.readyState===WebSocket.OPEN&&q.send(JSON.stringify({type:ee,...Re}))},t[137]=q,t[138]=Ja):Ja=t[138];const Be=Ja;let el;t[139]!==(ue==null?void 0:ue.id)||t[140]!==Be?(el=(ee,Re)=>{di.current=!0,Be("session.create",{preconfigId:ee,title:Re,workspaceId:ue==null?void 0:ue.id})},t[139]=ue==null?void 0:ue.id,t[140]=Be,t[141]=el):el=t[141];const Oi=el;let Gs;t[142]!==(ue==null?void 0:ue.id)||t[143]!==Be||t[144]!==y||t[145]!==Qe?(Gs=ee=>{$t(Ue=>Ue.filter(Xe=>Xe.sessionId!==ee)),J(Ue=>{if(Ue.size>0)for(const Xe of Ue)Jn.current.add(Xe);return new Set}),$n(!1);const Re=y.find(Ue=>Ue.id===ee);if(Re!=null&&Re.workspaceId&&Re.workspaceId!==(ue==null?void 0:ue.id)){const Ue=Qe.find(Xe=>Xe.id===Re.workspaceId);Ue&&it(Ue)}Be("session.resume",{sessionId:ee})},t[142]=ue==null?void 0:ue.id,t[143]=Be,t[144]=y,t[145]=Qe,t[146]=Gs):Gs=t[146];const hi=Gs;let tl;t[147]!==Be?(tl=ee=>{Be("session.close",{sessionId:ee})},t[147]=Be,t[148]=tl):tl=t[148];const na=tl;let ra;t[149]!==Be?(ra=(ee,Re)=>{Be("session.revert",{sessionId:ee,messageId:Re})},t[149]=Be,t[150]=ra):ra=t[150];const Cc=ra;let nl;t[151]!==Be?(nl=(ee,Re)=>{Be("session.fork",{sessionId:ee,messageId:Re})},t[151]=Be,t[152]=nl):nl=t[152];const kc=nl;let rl;t[153]!==Be?(rl=ee=>{Be("session.compact",{sessionId:ee})},t[153]=Be,t[154]=rl):rl=t[154];const Ec=rl;let il;t[155]!==Be?(il=ee=>{Be("session.reopen",{sessionId:ee})},t[155]=Be,t[156]=il):il=t[156];const ia=il;let sl;t[157]!==Be?(sl=ee=>{Be("session.delete",{sessionId:ee})},t[157]=Be,t[158]=sl):sl=t[158];const sa=sl;let Ks;t[159]!==k||t[160]!==Be?(Ks=ee=>{k&&Be("session.update",{sessionId:k.id,preconfigId:ee})},t[159]=k,t[160]=Be,t[161]=Ks):Ks=t[161];const os=Ks;let ol;t[162]!==k||t[163]!==Be?(ol=(ee,Re)=>{te(ee),ae(null),k&&Be("session.update_model",{sessionId:k.id,modelId:ee,providerId:Re})},t[162]=k,t[163]=Be,t[164]=ol):ol=t[164];const al=ol;let oa;t[165]!==U||t[166]!==k||t[167]!==Be?(oa=ee=>{k&&(Be("session.update_model",{sessionId:k.id,modelId:k.selectedModel||U,providerId:k.selectedProvider||"openai",variant:ee}),ae(ee))},t[165]=U,t[166]=k,t[167]=Be,t[168]=oa):oa=t[168];const ll=oa;let aa;t[169]!==Be?(aa=(ee,Re)=>{Be("session.rename",{sessionId:ee,title:Re})},t[169]=Be,t[170]=aa):aa=t[170];const as=aa;let pi;t[171]!==k||t[172]!==hi?(pi=()=>{k!=null&&k.parentId&&hi(k.parentId)},t[171]=k,t[172]=hi,t[173]=pi):pi=t[173];const Ac=pi;let cl;t[174]!==Be?(cl=(ee,Re)=>{Be("queue.add",{sessionId:ee,content:Re})},t[174]=Be,t[175]=cl):cl=t[175];const Rc=cl;let la;t[176]!==Be?(la=ee=>{Be("queue.remove",{queueId:ee})},t[176]=Be,t[177]=la):la=t[177];const ul=la;let Li;t[178]!==Rc||t[179]!==k||t[180]!==qr||t[181]!==Be||t[182]!==F?(Li=ee=>{!k||qr||(k.runningAt||F.has(k.id)?Rc(k.id,ee):Be("chat.message",{sessionId:k.id,content:ee}))},t[178]=Rc,t[179]=k,t[180]=qr,t[181]=Be,t[182]=F,t[183]=Li):Li=t[183];const ls=Li;let dl;t[184]!==Be?(dl=(ee,Re,Ue)=>{$t(Xe=>Xe.filter(ge=>ge.toolCallId!==ee)),Be("permission.response",{toolCallId:ee,allowed:Re,alwaysAllow:Ue})},t[184]=Be,t[185]=dl):dl=t[185];const Ys=dl;let ca;t[186]!==k||t[187]!==Be?(ca=()=>{k&&Be("session.interrupt",{sessionId:k.id})},t[186]=k,t[187]=Be,t[188]=ca):ca=t[188];const cs=ca;let Xs;t[189]!==ue||t[190]!==Be?(Xs=()=>{ue&&Be("permission.list",{workspaceId:ue.id})},t[189]=ue,t[190]=Be,t[191]=Xs):Xs=t[191];const ua=Xs;let da;t[192]!==Be?(da=ee=>{Be("provider.connect",{provider:ee})},t[192]=Be,t[193]=da):da=t[193];const fl=da;let fa;t[194]!==Be?(fa=ee=>{Be("provider.disconnect",{provider:ee})},t[194]=Be,t[195]=fa):fa=t[195];const Tc=fa;let hl;if(t[196]!==(ue==null?void 0:ue.id)||t[197]!==y){let ee;t[199]!==(ue==null?void 0:ue.id)?(ee=Re=>Re.workspaceId===(ue==null?void 0:ue.id),t[199]=ue==null?void 0:ue.id,t[200]=ee):ee=t[200],hl=y.filter(ee),t[196]=ue==null?void 0:ue.id,t[197]=y,t[198]=hl}else hl=t[198];const ha=hl;let pl;if(t[201]!==(n==null?void 0:n.id)||t[202]!==a){let ee;t[204]!==(n==null?void 0:n.id)?(ee=Re=>Re.serverId===(n==null?void 0:n.id)&&Re.workspaceId,t[204]=n==null?void 0:n.id,t[205]=ee):ee=t[205],pl=a.filter(ee).map(uH),t[201]=n==null?void 0:n.id,t[202]=a,t[203]=pl}else pl=t[203];const pa=pl;let ln,ut,us,mi,gi,vi,Ii,Qs,nr,Kr;if(t[206]!==n||t[207]!==ue||t[208]!==Pe||t[209]!==oi||t[210]!==na||t[211]!==Ec||t[212]!==yr||t[213]!==I||t[214]!==pn||t[215]!==Oi||t[216]!==U||t[217]!==k||t[218]!==De||t[219]!==Ws||t[220]!==pa||t[221]!==kc||t[222]!==Xo||t[223]!==ss||t[224]!==ea||t[225]!==Go||t[226]!==cs||t[227]!==an||t[228]!==Ac||t[229]!==Ys||t[230]!==as||t[231]!==qr||t[232]!==l||t[233]!==_e||t[234]!==en||t[235]!==Gt||t[236]!==sa||t[237]!==w||t[238]!==_||t[239]!==Kt||t[240]!==Tn||t[241]!==ul||t[242]!==ia||t[243]!==hi||t[244]!==Jt||t[245]!==Cc||t[246]!==ie||t[247]!==ls||t[248]!==Be||t[249]!==Ye||t[250]!==e.length||t[251]!==Z||t[252]!==y||t[253]!==ce||t[254]!==pe||t[255]!==je||t[256]!==F||t[257]!==al||t[258]!==os||t[259]!==ll||t[260]!==ha||t[261]!==Qe){const ee=k?Xo(k.id):[],Re=k&&(Mc=ue==null?void 0:ue.name)!=null?Mc:"Jean2";let Ue;t[272]!==w?(Ue=w.filter(cH),t[272]=w,t[273]=Ue):Ue=t[273];const Xe=Ue;let ge;t[274]!==((jc=Xe[0])==null?void 0:jc.id)||t[275]!==Be||t[276]!==Qe?(ge=jt=>{var Bc;it(Qe.find(zc=>zc.id===jt)||null),di.current=!0;const In=(Bc=Xe[0])==null?void 0:Bc.id;Be("session.create",{preconfigId:In,workspaceId:jt})},t[274]=(pd=Xe[0])==null?void 0:pd.id,t[275]=Be,t[276]=Qe,t[277]=ge):ge=t[277];const ke=ge;let $e;t[278]===Symbol.for("react.memo_cache_sentinel")?($e=jt=>{Ve(jt),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var In;(In=Q.current)==null||In.focusSessionPanel()})})},t[278]=$e):$e=t[278];const vt=$e;let Xt,Vn;t[279]===Symbol.for("react.memo_cache_sentinel")?(Vn=()=>Me(!1),Xt=()=>{var jt;return(jt=G.current)==null?void 0:jt.focus()},t[279]=Xt,t[280]=Vn):(Xt=t[279],Vn=t[280]);let gn;t[281]!==ue||t[282]!==Oi||t[283]!==((md=Xe[0])==null?void 0:md.id)?(gn=()=>{var jt;ue&&Oi((jt=Xe[0])==null?void 0:jt.id)},t[281]=ue,t[282]=Oi,t[283]=(gd=Xe[0])==null?void 0:gd.id,t[284]=gn):gn=t[284];let Wn;t[285]===Symbol.for("react.memo_cache_sentinel")?(Wn=()=>vt(oH),t[285]=Wn):Wn=t[285];let Pi;t[286]!==cs||t[287]!==gn?(Pi={onCloseTerminal:Vn,focusChatInput:Xt,onNewSession:gn,onNewWindow:aH,onToggleViewMode:Wn,setTerminalOpen:Me,sidebarRef:Q,terminalPanelRef:Y,onStopStreaming:cs},t[286]=cs,t[287]=gn,t[288]=Pi):Pi=t[288];const vn=Pi,Ic=!(k!=null&&k.parentId);ut=!!n;const _i=()=>{var jt;return e.length===0?g.jsx(Nx,{onServerAdded:Go,error:oi||void 0}):ut?l?g.jsx("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:g.jsx(Tx,{message:`Connecting to ${(n==null?void 0:n.name)||"server"}...`})}):!I&&y.length===0?pn?g.jsx("div",{className:"flex w-full h-full items-center justify-center bg-background",children:g.jsx(zF,{serverUrl:Ye,authError:oi,retryCount:Jt,nextRetryIn:en,onRetry:Kh,onLogout:an})}):g.jsxs("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:[g.jsx(Tx,{}),g.jsx(ze,{variant:"ghost",size:"sm",onClick:an,className:"text-muted-foreground",children:"Change Server"})]}):g.jsx(g.Fragment,{children:k?g.jsx(xF,{inputRef:G,session:k,messagesWithParts:ee,queuedMessages:Tn[k.id]||[],preconfigs:Ic?Xe:w,prompts:_,models:_e,connectedProviderIds:new Set(Kt.filter(sH).map(iH)),connectableProviderIds:new Set(Kt.filter(rH).map(nH)),defaultModel:De,onSendMessage:ls,onRemoveFromQueue:ul,onChangePreconfig:os,onChangeModel:al,onChangeVariant:ll,selectedVariant:ie,variants:(jt=_e.find(In=>In.id===U))==null?void 0:jt.variants,pendingPermissions:Gt,onPermissionResponse:Ys,onRename:as,usage:Z,modelName:U,onNavigateToSubagent:hi,onNavigateBack:Ac,isStreaming:F.has(k.id)||!!k.runningAt,onInterrupt:cs,onRevert:Cc,onFork:kc,onCompact:ee.filter(tH).length>=4?()=>Ec(k.id):void 0,isCompacting:qr,compactionSuccess:yr,onClearCompactionSuccess:()=>$n(!1),serverUrl:Ye!=null?Ye:void 0,apiToken:Pe!=null?Pe:void 0}):g.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-center text-muted-foreground px-6",children:[g.jsx("h2",{className:"mb-2",children:"Select or create a session"}),g.jsx("p",{children:"Choose a session from the sidebar or create a new one to start chatting."})]})}):g.jsx(Nx,{onServerAdded:Go,error:oi||void 0})};ln=Y8,Qs=!0,t[289]!==vn?(nr=g.jsx(ZF,{...vn}),t[289]=vn,t[290]=nr):nr=t[290],t[291]!==ue||t[292]!==na||t[293]!==I||t[294]!==Oi||t[295]!==ke||t[296]!==k||t[297]!==Ws||t[298]!==pa||t[299]!==ss||t[300]!==ea||t[301]!==as||t[302]!==ut||t[303]!==Gt||t[304]!==sa||t[305]!==((Oc=Xe[0])==null?void 0:Oc.id)||t[306]!==ia||t[307]!==hi||t[308]!==y||t[309]!==je||t[310]!==F||t[311]!==ha||t[312]!==Qe?(Kr=ut&&g.jsx(fj,{ref:Q,allSessions:y,viewMode:je,favoritedWorkspaceIds:pa,sessions:ha,currentSession:k,currentSessionId:(Lc=k==null?void 0:k.id)!=null?Lc:null,streamingSessionIds:F,connected:I,workspaces:Qe,activeWorkspace:ue,onCreateSession:()=>{var jt;return Oi((jt=Xe[0])==null?void 0:jt.id)},onResumeSession:hi,onCloseSession:na,onReopenSession:ia,onDeleteSession:sa,onRenameSession:as,onSelectWorkspace:wc,onCreateVirtualWorkspace:ea,onCreatePhysicalWorkspace:ss,onDeleteWorkspace:Ws,onOpenSettings:()=>dt(!0),onOpenMCP:()=>nt(!0),onOpenAddServer:()=>Ur(!0),onServerSwitch:tr,onEscape:()=>{var jt;k&&((jt=G.current)==null||jt.focus())},onCreateSessionInWorkspace:ke,pendingPermissions:Gt}),t[291]=ue,t[292]=na,t[293]=I,t[294]=Oi,t[295]=ke,t[296]=k,t[297]=Ws,t[298]=pa,t[299]=ss,t[300]=ea,t[301]=as,t[302]=ut,t[303]=Gt,t[304]=sa,t[305]=(ml=Xe[0])==null?void 0:ml.id,t[306]=ia,t[307]=hi,t[308]=y,t[309]=je,t[310]=F,t[311]=ha,t[312]=Qe,t[313]=Kr):Kr=t[313],us="flex-1 flex flex-col overflow-hidden",t[314]===Symbol.for("react.memo_cache_sentinel")?(mi={paddingTop:"env(safe-area-inset-top, 0)",paddingBottom:"env(safe-area-inset-bottom, 0)"},t[314]=mi):mi=t[314];let fs;t[315]!==ut?(fs=ut&&g.jsx(Eb,{}),t[315]=ut,t[316]=fs):fs=t[316];let yi;t[317]!==Re?(yi=g.jsx("span",{className:"font-semibold",children:Re}),t[317]=Re,t[318]=yi):yi=t[318];let dr;t[319]!==fs||t[320]!==yi?(dr=g.jsxs("div",{className:"flex items-center gap-2",children:[fs,yi]}),t[319]=fs,t[320]=yi,t[321]=dr):dr=t[321];let Fi;t[322]!==ut?(Fi=ut&&g.jsx(Dx,{onServerSwitch:tr,onSelectWorkspace:Vs}),t[322]=ut,t[323]=Fi):Fi=t[323];let hs;t[324]!==ut||t[325]!==je?(hs=ut&&g.jsx(Mx,{viewMode:je,onViewModeChange:vt}),t[324]=ut,t[325]=je,t[326]=hs):hs=t[326];let Hi;t[327]!==ue||t[328]!==ut||t[329]!==ce?(Hi=ut&&ue&&g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:()=>xe(!ce),title:ce?"Hide Files":"Show Files",children:g.jsx(Eg,{className:"w-4 h-4"})}),t[327]=ue,t[328]=ut,t[329]=ce,t[330]=Hi):Hi=t[330];let ps;t[331]!==ue||t[332]!==ut||t[333]!==pe?(ps=ut&&ue&&g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:()=>Me(!pe),title:pe?"Hide Terminal":"Show Terminal",children:g.jsx(Oy,{className:"w-4 h-4"})}),t[331]=ue,t[332]=ut,t[333]=pe,t[334]=ps):ps=t[334];let _n;t[335]!==Fi||t[336]!==hs||t[337]!==Hi||t[338]!==ps?(_n=g.jsxs("div",{className:"flex items-center gap-1",children:[Fi,hs,Hi,ps]}),t[335]=Fi,t[336]=hs,t[337]=Hi,t[338]=ps,t[339]=_n):_n=t[339],t[340]!==dr||t[341]!==_n?(gi=g.jsxs("header",{className:"md:hidden flex items-center justify-between p-3 border-b border-border bg-background sticky top-0 z-10",children:[dr,_n]}),t[340]=dr,t[341]=_n,t[342]=gi):gi=t[342];let Ar;t[343]!==ut?(Ar=ut&&g.jsx(Eb,{}),t[343]=ut,t[344]=Ar):Ar=t[344];let Rr;t[345]!==Re?(Rr=g.jsx("span",{className:"font-semibold",children:Re}),t[345]=Re,t[346]=Rr):Rr=t[346];let bi;t[347]!==Ar||t[348]!==Rr?(bi=g.jsxs("div",{className:"flex items-center gap-2",children:[Ar,Rr]}),t[347]=Ar,t[348]=Rr,t[349]=bi):bi=t[349];let Qr;t[350]!==ut?(Qr=ut&&g.jsx(Dx,{onServerSwitch:tr,onSelectWorkspace:Vs}),t[350]=ut,t[351]=Qr):Qr=t[351];let yn;t[352]!==ut||t[353]!==je?(yn=ut&&g.jsx(Mx,{viewMode:je,onViewModeChange:vt}),t[352]=ut,t[353]=je,t[354]=yn):yn=t[354];let bn;t[355]!==ue||t[356]!==ut||t[357]!==ce?(bn=ut&&ue&&g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:()=>xe(!ce),title:ce?"Hide Files":"Show Files",children:g.jsx(Eg,{className:"w-4 h-4"})}),t[355]=ue,t[356]=ut,t[357]=ce,t[358]=bn):bn=t[358];let rr;t[359]!==ue||t[360]!==ut||t[361]!==pe?(rr=ut&&ue&&g.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:()=>Me(!pe),title:pe?"Hide Terminal":"Show Terminal",children:g.jsx(Oy,{className:"w-4 h-4"})}),t[359]=ue,t[360]=ut,t[361]=pe,t[362]=rr):rr=t[362];let Ln;t[363]!==Qr||t[364]!==yn||t[365]!==bn||t[366]!==rr?(Ln=g.jsxs("div",{className:"flex items-center gap-2",children:[Qr,yn,bn,rr]}),t[363]=Qr,t[364]=yn,t[365]=bn,t[366]=rr,t[367]=Ln):Ln=t[367],t[368]!==bi||t[369]!==Ln?(vi=g.jsxs("header",{className:"hidden md:flex items-center justify-between p-3 border-b border-border",children:[bi,Ln]}),t[368]=bi,t[369]=Ln,t[370]=vi):vi=t[370],Ii=_i(),t[206]=n,t[207]=ue,t[208]=Pe,t[209]=oi,t[210]=na,t[211]=Ec,t[212]=yr,t[213]=I,t[214]=pn,t[215]=Oi,t[216]=U,t[217]=k,t[218]=De,t[219]=Ws,t[220]=pa,t[221]=kc,t[222]=Xo,t[223]=ss,t[224]=ea,t[225]=Go,t[226]=cs,t[227]=an,t[228]=Ac,t[229]=Ys,t[230]=as,t[231]=qr,t[232]=l,t[233]=_e,t[234]=en,t[235]=Gt,t[236]=sa,t[237]=w,t[238]=_,t[239]=Kt,t[240]=Tn,t[241]=ul,t[242]=ia,t[243]=hi,t[244]=Jt,t[245]=Cc,t[246]=ie,t[247]=ls,t[248]=Be,t[249]=Ye,t[250]=e.length,t[251]=Z,t[252]=y,t[253]=ce,t[254]=pe,t[255]=je,t[256]=F,t[257]=al,t[258]=os,t[259]=ll,t[260]=ha,t[261]=Qe,t[262]=ln,t[263]=ut,t[264]=us,t[265]=mi,t[266]=gi,t[267]=vi,t[268]=Ii,t[269]=Qs,t[270]=nr,t[271]=Kr}else ln=t[262],ut=t[263],us=t[264],mi=t[265],gi=t[266],vi=t[267],Ii=t[268],Qs=t[269],nr=t[270],Kr=t[271];let Yr;t[371]!==(ue==null?void 0:ue.id)||t[372]!==(ue==null?void 0:ue.name)||t[373]!==(ue==null?void 0:ue.path)||t[374]!==Pe||t[375]!==ut||t[376]!==Ye||t[377]!==pe?(Yr=ut&&g.jsx(Lj,{ref:Y,workspaceId:ue==null?void 0:ue.id,workspacePath:ue==null?void 0:ue.path,workspaceName:ue==null?void 0:ue.name,serverUrl:Ye!=null?Ye:void 0,apiToken:Pe!=null?Pe:void 0,isOpen:pe,onClose:()=>Me(!1)}),t[371]=ue==null?void 0:ue.id,t[372]=ue==null?void 0:ue.name,t[373]=ue==null?void 0:ue.path,t[374]=Pe,t[375]=ut,t[376]=Ye,t[377]=pe,t[378]=Yr):Yr=t[378];let Bi;t[379]!==us||t[380]!==mi||t[381]!==gi||t[382]!==vi||t[383]!==Ii||t[384]!==Yr?(Bi=g.jsxs("main",{className:us,style:mi,children:[gi,vi,Ii,Yr]}),t[379]=us,t[380]=mi,t[381]=gi,t[382]=vi,t[383]=Ii,t[384]=Yr,t[385]=Bi):Bi=t[385];let ds;t[386]!==(ue==null?void 0:ue.id)||t[387]!==(ue==null?void 0:ue.path)||t[388]!==Pe||t[389]!==ct||t[390]!==fl||t[391]!==Tc||t[392]!==an||t[393]!==ut||t[394]!==be||t[395]!==St||t[396]!==Kt||t[397]!==ua||t[398]!==Be||t[399]!==Ye||t[400]!==ce||t[401]!==Le||t[402]!==Ze?(ds=ut&&g.jsxs(g.Fragment,{children:[g.jsx(bj,{workspaceId:ue==null?void 0:ue.id,serverUrl:Ye!=null?Ye:void 0,apiToken:Pe!=null?Pe:void 0,isOpen:ce,onClose:()=>xe(!1)}),g.jsx(MF,{open:Ze,onOpenChange:dt,permissions:St,onRefreshPermissions:ua,onRevokePermission:ee=>{Be("permission.revoke",{permissionId:ee})},onRevokeAllPermissions:()=>{Be("permission.revoke_all",{workspaceId:ue==null?void 0:ue.id})},apiToken:Pe,onLogout:an,providerStatuses:Kt,onConnectProvider:fl,onDisconnectProvider:Tc,chatFinishSoundEnabled:ct,onChatFinishSoundEnabledChange:Tt,permissionSoundEnabled:be,onPermissionSoundEnabledChange:et}),g.jsx(BF,{open:Le,onOpenChange:nt,workspaceId:ue==null?void 0:ue.id,workspacePath:ue==null?void 0:ue.path,serverUrl:Ye!=null?Ye:void 0,apiToken:Pe!=null?Pe:void 0})]}),t[386]=ue==null?void 0:ue.id,t[387]=ue==null?void 0:ue.path,t[388]=Pe,t[389]=ct,t[390]=fl,t[391]=Tc,t[392]=an,t[393]=ut,t[394]=be,t[395]=St,t[396]=Kt,t[397]=ua,t[398]=Be,t[399]=Ye,t[400]=ce,t[401]=Le,t[402]=Ze,t[403]=ds):ds=t[403];let Xr;t[404]===Symbol.for("react.memo_cache_sentinel")?(Xr=ee=>{Ur(ee),ee||$r(null)},t[404]=Xr):Xr=t[404];let Er;t[405]!==li||t[406]!==ai?(Er=g.jsx(PF,{open:ai,onOpenChange:Xr,editServer:li}),t[405]=li,t[406]=ai,t[407]=Er):Er=t[407];let Zs;return t[408]!==ln||t[409]!==Er||t[410]!==Qs||t[411]!==nr||t[412]!==Kr||t[413]!==Bi||t[414]!==ds?(Zs=g.jsxs(ln,{defaultOpen:Qs,children:[nr,Kr,Bi,ds,Er]}),t[408]=ln,t[409]=Er,t[410]=Qs,t[411]=nr,t[412]=Kr,t[413]=Bi,t[414]=ds,t[415]=Zs):Zs=t[415],Zs}function tH(t){return t.message.role!=="system"}function nH(t){return t.provider}function rH(t){return t.connectable}function iH(t){return t.provider}function sH(t){return t.connected}function oH(t){return t==="overview"?"default":"overview"}function aH(){a1("create_new_window").catch(lH)}function lH(){}function cH(t){return t.mode!=="subagent"}function uH(t){return t.workspaceId}function dH(t){return t.message}function fH(t){return t.message}function hH(t){const e=new Date().toISOString();return t.map(n=>({...n,revokedAt:e}))}function pH(t){return{toolCallId:t.toolCallId,sessionId:t.sessionId,toolName:t.toolName,args:t.args,permissionType:t.permissionType,permissionKey:t.permissionKey,message:t.message,details:t.details,dangerous:t.dangerous,childSessionId:t.childSessionId,subagentName:t.subagentName}}function mH(t){return t.toolCallId}function gH(t){return t.message}function vH(){return{message:"Failed to delete workspace"}}function _H(t){return t.json()}function yH(t){return t.json()}function bH(t){return t.json()}function xH(t){return t.json()}function SH(t){return t.json()}function wH(t){return t.json()}function CH(t){return t+1}function kH(t){return t+1}function EH(t){return t+1}function AH(t){return t+1}function RH(t){return t+1}function TH(t){console.error("WebSocket error:",t)}function NH(t,e){return t.createdAt-e.createdAt}function DH(t){return t+1}function MH(t){return t+1}function jH(){const t=localStorage.getItem("jean2_sound_permission_enabled");return t!==null?t==="true":!0}function OH(){const t=localStorage.getItem("jean2_sound_chat_finish_enabled");return t!==null?t==="true":!0}function LH(){return localStorage.getItem("jean2_sidebar_view")||"default"}function IH(){return new Set}function BH(){const t=ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsx(U5,{children:g.jsx(eH,{})}),t[0]=e):e=t[0],e}bE.createRoot(document.getElementById("root")).render(g.jsx(D.StrictMode,{children:g.jsx(CE,{defaultMode:"system",defaultScheme:"neutral",children:g.jsx(BH,{})})}));
|